Hello Everyone,
I have a sim^le question here and needing your input.
I have a parent table "Orders" with a column Status "closed" / "Open"
I have another child table of the main table "Orders" that is called "Order Summary" that has order line items , qty, weight, price, ...
What i am trying to acheive is that whenever the Order status is set to Closed (in the "Order" Table) , to trigger a task that will export a csv file of the "Order Summary"
I have started by setting up the csv template, and created a BOT
Step 1 to be activated on Updates only in the table "Orders"
with a condition [Status]="Closed"
Step 2 i created that task that would creat a file in the google drive of the table "Order Summary"
The issue:
When i change the Status of the order in table "Order" to Closed
a file of this table is created and not the Order Summary
Below photos for ref:
The expected result is a csv file of the "Order Summary" Table and not the "Orders" Table.
Any tips or explanation of what am doing wrong would be really appreciated.
Thanks
Solved! Go to Solution.
Please move <<End>> In the line below. The suggested changes highlighted in red
"ID","Order ID","Ordered By","Order Time","Ordered Qty","Artikelname","Kurzbeschreibung","Artikelnummer","EAN/Barcode","Std. VK Netto","Inhalt/Menge","Remarks","Image","Total Amount"
<<Start:[Related Order Summarys]>>
"<<[ID]>>","<<[Order ID]>>","<<[Ordered By]>>","<<[Order Time]>>","<<[Ordered Qty]>>","<<[Artikelname]>>","<<[Kurzbeschreibung]>>","<<[Artikelnummer]>>","<<[EAN/Barcode]>>","<<[Std. VK Netto]>>","<<[Inhalt/Menge]>>","<<[Remarks]>>","<<[Image]>>","<<[Total Amount]>>"
<<END>>
May we know the expression you are using in the CSV template to pull in the child table's rows?
@Suvrutt_Gurjar Thanks for your response and bringing up the CSV Template
I am using the follwoing to filter the rows that match the Order ID of the parent record:
"ID","Order ID","Ordered By","Order Time","Ordered Qty","Artikelname","Kurzbeschreibung","Artikelnummer","EAN/Barcode","Std. VK Netto","Inhalt/Menge","Remarks","Image","Total Amount"
<<Start:FILTER("ORDER SUMMARY",[_ThisRow].[ID] = [Order ID])>>
"<<[ID]>>","<<[Order ID]>>","<<[Ordered By]>>","<<[Order Time]>>","<<[Ordered Qty]>>","<<[Artikelname]>>","<<[Kurzbeschreibung]>>","<<[Artikelnummer]>>","<<[EAN/Barcode]>>","<<[Std. VK Netto]>>","<<[Inhalt/Menge]>>","<<[Remarks]>>","<<[Image]>>","<<[Total Amount]>>"<<END>>
i have tried it now, and its pulling the child records of that parent ID into the csv but instead of creating a row of every record, it created 1 row for the 5 child record, listed in 1 row (am new to the CSV Templates, bare with me)
Parent Table Columns:
ID
Order ID
Ordered By
Order Time
Status
Related Order Summarys
Total Amount
Child Table Columns:
ID
Order ID (Ref)
Ordered By
Order Time
Ordered Qty
Artikelname
Kurzbeschreibung
Artikelnummer
EAN/Barcode
Std. VK Netto
Inhalt/Menge
Remarks
Image
Total Amount
Hi @Hussein_Osseily ,
Thank you for the details. Could you try using the following start expression
<<Start:[Related Order Summarys]>> instead of <<Start:FILTER("ORDER SUMMARY",[_ThisRow].[ID] = [Order ID])>>
Also please set up the CSV to fire on just the Order Table , since the [Related Order Summarys] column is in the Orders table itself. You do not need to use "Orders Summary" table in the automation task.
So if i get you correctly,
I have replaced the START Expression with <<Start:[Related Order Summarys]>>
and in the Task, i have kept the action to "Creat a file" BUT Changed the table to "Order"
I got the intended result but the 3 related child records were created in 1 single row
Please move <<End>> In the line below. The suggested changes highlighted in red
"ID","Order ID","Ordered By","Order Time","Ordered Qty","Artikelname","Kurzbeschreibung","Artikelnummer","EAN/Barcode","Std. VK Netto","Inhalt/Menge","Remarks","Image","Total Amount"
<<Start:[Related Order Summarys]>>
"<<[ID]>>","<<[Order ID]>>","<<[Ordered By]>>","<<[Order Time]>>","<<[Ordered Qty]>>","<<[Artikelname]>>","<<[Kurzbeschreibung]>>","<<[Artikelnummer]>>","<<[EAN/Barcode]>>","<<[Std. VK Netto]>>","<<[Inhalt/Menge]>>","<<[Remarks]>>","<<[Image]>>","<<[Total Amount]>>"
<<END>>
Sweet !
it did the trick , all in place now, thanks a lot @Suvrutt_Gurjar
User | Count |
---|---|
36 | |
31 | |
30 | |
20 | |
17 |