Field value in a RG is another RG list, how to set that?

I have a repeating group one of its field values is a list of another repeating group, but when I create a new thing and try to choose RG list of items, it doesn’t work, is there a solution for that?

A Repeating Group is an element used for holding, and usually displaying, a list of data…

So I’m not quite sure what you mean by…

I have a repeating group one of its field values is a list of another repeating group

I assume you’re just talking about the Datatype that the RG happens to be holding?

In any case, if your question is about why the expression you’ve entered in the ‘File’ field of your Create a New Transaction workflow action is invalid (why it’s in red), the answer is simple…

It’s a Type Mismatch… meaning the type of data you’re trying to set is NOT the same as the type of data the field expects.

Your File field is expecting a single value (I’d guess a File, but without seeing your database I can’t possibly know for sure)…

But you’re trying to set it as a list of somethings (Data Files by the looks of it).

In any case, the Issue Checker will tell you exactly what the issue is.

To fix it you’ll either need to change the ‘type’ of the File field, or change the value you’re entering to match the expected Type.

Of course, it depends on what you’re trying to do, and how your app works, as to which of those is the correct solution in your case.

1 Like

Thanks for your answer Adam,

What I want is: I have a RG files to display files links which are created by file uploader, as below:

Screen Shot 2023-03-04 at 7.34.14 PM

Then, I want for each new item I create in RG transaction, the file value to be all files uploaded as in the RG file, so I want to set the value of file in RG transaction to be the list of items in the RG files, it doesnt work?

the data type for RG files is:
Type name: Data File.
Field name: Document.
Field type: File

the data type for RG transactionis:
Type name: Transaction
Field name: File
Field type: Data File (from the data file DB).

You need to change the File field on the Transaction datatype to be a list of Data Files

1 Like

Thanks a lot Adam, that is exactly what I wanted.

This topic was automatically closed after 70 days. New replies are no longer allowed.