List details template

lga
New Member

Hello

New day , new problem, and perhaps new solution?

In my apps, i try to create documents and save them on g-drive.

With my first “behaviour/worflow” no problem with the export of datas from a table.

With the second which may send a list of datas from another table if i use the generated document template, Test button is ok, and i can generate manually , but this document is only for one row, and i need to list the details for ech [numctrl] value.

In my table i have different rows with a same id [numctrl] i put this [numctrl] as key.

Here the error’s message, the button test ok, but impossible to send the document at the end,

Failed: Action not performed because 2 errors are present.

Error: Workflow rule ‘rapport_qual 2’ action ‘doc_ra_qual’ Body template. Start expression ‘[Numctrl]’ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table.

Error: The document body is empty.

I think the second error dues to the first one, but I don’t understand for the problem of the list in the first error.

After a long reflexion and looked in the faq, it’s like design of «detail orders».

So, I taught to change and to get the informations using relation: starting from a control closed with the value [Numctrl] as single reference, then

i put my value [Numctrl] as a key in the first table « Prepctrl » where i plan my control,

i put the value[Numctrl] as a Ref (joined) with the table « Prepctrl » in my second table «pointctrl»,

i put the value[Numctrl] as a Ref (joined) with the table « Prepctrl » in my third table «signctrl».

For the 3 tables, the columns [Numctrl] are Keys.

For the table « Prepctrl » the column is text type, for the two others, « Ref »

I came back to my workflows, create a new template for my document, it seems allright, I test the workflow creation ( button test) and it create a document ( with the columns of my table « signctrl »).

I put the result of a masked column coming from « signctrl » , in my document it’s send another document…perfect

I change in my template using the principes of the « OrderDetailTable Template» ( Cascade Fine Fruits), and it’s goes wrong…

Failed: Action not performed because 2 errors are present. Error: Workflow rule ‘rapport_qual 3’ action ‘doc_ra_qual’ Body template. Start expression ‘[Numctrl]’ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table. Error: The document body is empty.

3 days to turn around the template…faq and community, witout result.

i have a single [numctrl] in « prepctrl » & « signctrl » ( only one control can exist with this ID and of course only one control can be signed .

But in my table « pointctrl », for each control i can have 1 to x [numctrl] rows

What’s the matter, and what must be change to get a list in my document?

Thanks to anyone who understand more than me……and could help me

( Sorry for poor english language)

0 4 1,119
4 REPLIES 4

Steve
Platinum 4
Platinum 4

Please post a screenshot of the template.

Please also post a screenshot of the column list (from Data >> Columns in the app editor) for the table the template uses that includes at least the key column.

lga
New Member

Hello thanks for the answer

here in this first part the different view until to get result if i try to combinate in a unique table the 3 others

in this second part the second attempt with the 3 tables connected

2X_3_3e4c933b4d963876ca4f35f283a4b4c85d14c72f.jpeg

Perhaps it will be less complex to understand my problem with a view ans screenshots

Thank you for all the screenshots! Very helpful!

The problem is exactly what the error says: “Start expression ‘[Numctrl]’ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table.”

2X_e_e15559d6cd45ffe862404eb562e32c322c80b46c.png

2X_3_3df7058b84e051597cd1404b3fd445238dbb7c51.png

Numctrl is correctly a Ref, but it’s not a list of Ref. A <<Start>> tag starts the template to present each item in a list of items. The <<Start>> expression provides the list of items to present. Even if you only want to present one item, that one item must be presented as a list: a list with only one item. If your intent is, in fact, to present only a single item, change this:

<<Start:[Numctrl]>>

to this:

<<Start:LIST([Numctrl])>>

If your intent is to instead present all rows in the regroupement_controles table, use this <<Start>> tag:

<<Start:regroupement_controles[Numctrl]>>

lga
New Member

Hello thanks for the help and the time you spend with me.

I tried friday with from my test button, and it created a document for / from one of my rows registred ( good thing), but today when i came back to the job, i saw a new problem: in my first table where i prepare the control, the “ref” , the “control’s number”, which was calculated from 3 others columns… missing. As soon as my Numctrl’s column become a Key, no more formula…
and so, if more numctrl…no more possiblity to check new points in the control, not abble to sign the control…and create a document for the customer.
the warning message was:

I put the formula in the suggested value [Date]&"~"&[Contrôleur]&"~"&[Site]=>>
Another and different warning message=>

If I put the type " List"as type => warning message

Well, must i create a virtual column to have my Numctrl from a formula (and of course is it possible to put the key on a virtual column) , or more exactly from a sugested value because i don’t see why It « should generate a list of values », it’s just an item to agregate a ref , quickly identifiable, by the controler, and used in others tables.

The idea to store the Numctrl was to have a value in my table and a possibility to extract directly lines from the Google sheet ( if we might need it).

Before my problem of extraction of datas, no problem with it, my column was Text type without trouble…

Perhaps another fantastic idea?

Top Labels in this Space