25
Views
9
Comments
Solved
Export Only Latest Revision to Excel
Application Type
Reactive

I am trying export a list of transactions into excel. The transaction has revision numbers and I intend to export only the latest revision of the transactions.

Example:

2024-08-23 16-02-06
Mario Sebastian Abud Gonzalez
Solution

Hi @Daus Shah,

In a single aggregate, you won't be able to do it, but by adding a bit of logic and another aggregate, you can. I'm attaching an example.

Regards

Test.oml
2024-03-22 09-17-23
Chandra Vikas Sharma

Hi Daus,

if you using aggregate or Adv SQL. so you need to do that logic in filter condition of created by column so it will return you latest record  according to your req.

thanks

CV

2022-01-24 13-22-23
Vaibhav Patidar

Hi daus shah,

To extract the latest data in the excel you have to add the filter condition on the source of your excel data as per your requirement. Please let us know if you need any help while adding filter condition.


Thanks


2023-11-29 03-11-02
Daus Shah

I would appreciate it if you could show me the conditions that I can apply in the filter.

Thanks

2024-05-22 06-12-56
Vignesh Prakash

Hi @Daus Shah

Latest Revision of transaction in the sense do you have any particular time frame to be considered?
Eg: last 10 days or 15 days or last 50 transaction that has been updated recently etc?

BR,
Vignesh Prakash.


 

2023-11-29 03-11-02
Daus Shah

Hi @Vignesh Prakash,

I would like to show only the record of the latest revision. For example, if Document A have Revision 0, 1, 2, and 3. I would like to export only Revision 3.

Thanks

2024-08-23 16-02-06
Mario Sebastian Abud Gonzalez

@Daus Shah you can adapt to your sql,

SELECT *

FROM {Data} d

INNER JOIN (

    SELECT {Data}.[Project], {Data}.[Document], MAX({Data}.[Revision]) AS MaxRevisionNumber

    FROM {Data}

    GROUP BY {Data}.[Project], {Data}.[Document]

) AS LatestRevisions ON d.Project = LatestRevisions.Project AND d.Document = LatestRevisions.Document AND d.Revision = LatestRevisions.MaxRevisionNumber

Regards

2023-11-29 03-11-02
Daus Shah

Hi @Mario Abud,

Thank you for the suggestion, I will try it. Is it not possible to just use the aggregate without needing to use the sql?

Thanks.

2024-08-23 16-02-06
Mario Sebastian Abud Gonzalez
Solution

Hi @Daus Shah,

In a single aggregate, you won't be able to do it, but by adding a bit of logic and another aggregate, you can. I'm attaching an example.

Regards

Test.oml
2023-11-29 03-11-02
Daus Shah

Thank you so much @Mario Abud. This helps me to achieve what I wanted and make me understand how to use ListAppend as well :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.