Options

Worksheet Page,. Datasource is a union, Export using XML port

markclemarkcle Member Posts: 65
Hi All

Still relatively new to Nav/AL extension development. Trying to figure out how to approach this extension

We have items we need to label (the labels will be generated by exporting a CSV file for LoftWare labelling app).

I need to show a list of records based on a few parameters (mainly start and end date)

The problem is I need to get a list of items that either come from Production Order Routing Lines or expected PO Line receipts that fall within the date range

For example

Prod Order1 : Item A, Due 2/1
Prod Order2 : Item B, Due 2/14
Prod Order3 : Item C, Due 3/1

PO Line 1 : Item D, Due 2/5
PO Line 2 : Item E, Due 2/17
PO Line 3 : Item F, Due 3/11

So if user sets start date of 2/1 to 2/28 the worksheet should show the following with a few other fields from the item card

Item A, Due 2/1
Item B, Due 2/14
Item D, Due 2/5
Item E, Due 2/17

I then want the user to be able to sort, filter and (either delete rows or mark rows), to control which records will get exported



If I were doing in SQL, my data source would be a query that contains a Union.

In AL, I'm figuring this would be a Page of PageType Worksheet, but not sure what my source table would be. I'm guessing SourceTemporary would be true

Could someone point me in the right direction?

Thanks

Mark

Answers

  • Options
    KeptyKepty Member Posts: 54
    Yeah, the temporary table would be my way. So find any suitable table (or create a new one), set it as a source table for the page and set property SourceTableTemporary to true.

    Then on some action in this page run process that will find out related records based on your filters and insert them to the temp table.
    Tomáš Kapitán
  • Options
    markclemarkcle Member Posts: 65
    Thanks. From what I understand (could be wrong). a temp table has to have the same structure about the table on which it's based. I only need about 6 fields, so adding a whole sales line record structure would be a lot of overhead
  • Options
    KeptyKepty Member Posts: 54
    Sure, temp table IS the same table (but the data modification are not saved)
    Don't care about the number of fields in the table, in the temp table it has almost no performance impact on the app server. Just choose the table that suits your needs.
    Tomáš Kapitán
  • Options
    markclemarkcle Member Posts: 65
    OK thanks
Sign In or Register to comment.