The CreatorCon Call for Content is officially open! Get started here.

How to get sys_id on List Collector multi-row variable set?

lipan
Tera Contributor

Hi EveryOne,

 

I create a record producer "Create Case Contract" map to Case table, there are multiple rows of variable "Test Case Contract",I use a script to fill variable set's variables into the sc_task table, and in variable set "Test Case Contract", there is a List Collector "attachments". "attachments" is reference  to the attachment table. How to add a Reference qualifier to List Collector "attachments", so that it only displays the files "file1.xlsx" and "file2.xlsx" uploaded when using record producer "Create Case Contract" to create records?I try to use 「javascript:"table_sys_id=" + current.sys_id;'」,it's not work.

 

record producer

 

 

1.png

multiple rows of variable

2.png

Reference qualifier

3.png

 

Current situation,「javascript:"table_sys_id=" + current.sys_id;'」

4.png

Expected results:Create a record using the record producer, and display the uploaded attachments in the list collector of the multi line variable set

5.png

4 REPLIES 4

lipan
Tera Contributor

The method of fixed sys_id was used in the expected result graph (Javascript:"table_sys_id=d2c7f55c97bd0e1043d4b380f053af38";). How to dynamically obtain this sys_id? When creating a record using record producer (not yet submitted), the sys_id of the new record

 

lipan_1-1713773105130.png

 

Ryan Duce
Tera Guru

Attachments aren't inserted to the database until the record producer is saved, so the attachment records won't show  up in that list.

I recommend using the "Attachment" variable type to upload your attachments in a context that's relevant to each row of your variable set.

lipan
Tera Contributor

Hi Ryan Duce,

I just tried again. When creating a record using record producer, after uploading the file (which has not yet been submitted), the uploaded attachment will immediately appear in the attachment table. At this time, there is no new record in the case table

And the 'Attachment' variable type does not seem to be applicable to multi row variable sets,It displays the following error

'Attachment' variable cannot be part of multi-row variable set

 

 

lipan_4-1713774641348.png

 

lipan_3-1713774601651.png

 

 

 

lipan_2-1713774333024.png

 

 

 

Oh that's really annoying, sorry neither of those tips worked.

 

I think the problem is that current doesn't yet know what the record's sys ID will be. Typically a current object's sys ID will be represented as -1 until the record is saved.

 

I will defer to others in this case as I can't think of a way to do this without some hefty customisation. Although you might consider just allowing people to attach files at the top-level record producer and not associating them with each row in the variable set, since there'll be some element of human interaction on the case to validate the attachments and set up the individual contracts.