Converting list items into individual variables / Breaking up lists

20 views
Skip to first unread message

Henrik Waeltken

unread,
Apr 18, 2023, 6:06:03 AM4/18/23
to Ultradox
To the Ultradox user group,

I have a flow which loads one matching row from a Google Sheet and then assigns all values into a list. The command line block shows several key value pairs getting loaded. I've figured out how to use the information in a document merge using the template editor and the pre-written placeholders there (the OUT portion of the Google Sheets block does indicate that each list item has multiple values though). 

The issue is that I cannot refer to these key value pairs later in the flow (e. g. in constructing a condition in an IF block). It seems that while the list object is visible to the flow, individual list items are not.

What I really need though is for each key value pair contained in the list to be extracted and assigned into an individual variable after the loading the matching row from each Google Sheet. How do I configure this?

Thank you for any guidance. 


Henrik



Joshua Bastian

unread,
Apr 19, 2023, 1:55:01 PM4/19/23
to Henrik Waeltken, Ultradox
It seems like when I load a matching row from a Google Sheet, it assigns me a variable for each column.  This is not what's happening for you?

This e-mail is for the sole use of the intended recipient(s) and contains information which is confidential and/or legally privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or taking of any action in reliance on the contents of this e-mail information is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender by reply e-mail and destroy all copies of the original message.

--
You received this message because you are subscribed to the Google Groups "Ultradox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ultradox+u...@floreysoft.net.
To view this discussion on the web, visit https://groups.google.com/a/floreysoft.net/d/msgid/ultradox/bad6d976-8a1f-45e7-82f5-23ea0212668dn%40floreysoft.net.


--
Joshua Bastian, PE, CFEI
Mechanical Engineer

Answers from Ashes™ 

 

935 Pardee Street

Berkeley, CA 94710

800-726-5939 (headquarters)

619-243-4477 (mobile)

510-649-3099 (fax)

Joshua....@fcafire.com

www.FCAfire.com

 

Serving Clients Nationwide

 

Offices: Arizona - California - Idaho - Minnesota - Montana - Nevada - North Dakota - Oregon - South Dakota - Washington 

 

This e-mail is covered by the Electronic Communications Privacy Act, 18 U.S.C. Sec. 2510-2521, is confidential and may contain attorney-client materials and/or attorney work product, legally privileged and protected from disclosure.  This e-mail is intended only for the addressee(s) named above. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.


This e-mail and any attachments may contain confidential and privileged information. It is intended for use only by the person to whom it is addressed. If you are not the intended recipient or have received this in error, please notify us immediately by return e-mail, delete this e-mail, including all attachments, without copying, distributing or disclosing same. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Any review, re-transmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. E-mail is not a secure means of communication. Please advise us if you would prefer to use an alternate form of communication. We accept no responsibility or liability for loss or damage arising from the receipt or use of this transmission.

Henrik Waeltken

unread,
Apr 19, 2023, 6:26:39 PM4/19/23
to Ultradox, joshua....@fcafire.com, Ultradox, Henrik Waeltken
Here's what I'm observing.

1. I load a matching row from Google Sheets. The system records these as a list PerPersonal[0].List Items 1..N
2. The console can play back all items and their value
3. The individual items on the list and their value are not available later in the script to use against conditional, other flow elements. Their are encased in the list.

Ultradox Variables Issue.png

I found one workaround which is to embed a loop to iterate over each generated list and it seems to break up the list into individual list items which then can be accessed in the data model further down in the script.

Of course this is costly in terms of processing and credits and not desirable.

Ultradox Variables Issue.-fix png.png

Regards,


Henrik

Joshua Bastian

unread,
Apr 19, 2023, 8:26:09 PM4/19/23
to Henrik Waeltken, Ultradox
I wonder if it is because you are loading multiple matching rows.  

Daniel Florey

unread,
Apr 20, 2023, 3:04:51 AM4/20/23
to Joshua Bastian, Henrik Waeltken, Ultradox
It's a bit hard to get the whole picture without having access to the flow, but you should be able at any time to access individual items from a list by using the number in square brackets,e.g.:
First name of first item: ${PerPersonal[0].firstName} 
First name of second item: ${PerPersonal[1].firstName} 
etc.
You can assign these values to a new variable using the "Assign values" block or use them in conditions. If you share the flow with me in edit mode I can have a closer look.
Hope this helps.

Henrik Waeltken

unread,
Apr 20, 2023, 12:04:30 PM4/20/23
to Ultradox, daniel...@gmail.com, Henrik Waeltken, Ultradox, joshua....@fcafire.com
Daniel and Joshua

Creating the variable and then assigning it the list item using the [0] notation seems to have done the trick of extracting the list item out and into a dedicated variable which is visible to the rest of the flow and UI. I used the form edit to create the otherwise blank variable "firstName" and then assigned the value of ${PerPersonal[0].firstName} and it worked. Thank you for the pointers!

Please consider adding this use case to the documentation. This method of being able to create and prefill new variables with either dynamic data from lists or other variables using the forms while not actually requiring user interaction is not easy to glean from the existing content.  Thank you so much again!

Cheers

Henrik

firstName in Form.png


firstName inherits from List Item.png

Daniel Florey

unread,
Apr 24, 2023, 6:13:27 AM4/24/23
to Henrik Waeltken, Ultradox, daniel...@gmail.com, joshua....@fcafire.com
Hi Henrik,
thanks a lot for your valuable suggestions and screenshots.
I'll try to provide some more tutorial videos to get into these details.
It is quite hard to provide good documentation that covers various usecases without bloating up the size of the docs.
So any suggestion is appreciated!




--
Kind regards,

Daniel Florey




floreysoft GmbH
Telemannstraße 22, 20255 Hamburg, Germany
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg
HRB 106613 
Geschäftsführer: Daniel Florey
Reply all
Reply to author
Forward
0 new messages