I have a page where user can enter up to 5 account signers. Each account signer has primaryEmail, recoveryEmail, cel, etc. When I set each signer up as an individual qodly source object (5 objects total), I have no problem attaching the object qodly source to a text input, ie: signer1.primaryEmail can be used as qodly source for the related text input component. However, I have trouble setting up the signers as an array/collection of objects. ie When I create a qodlysource array of 5 signer objects (which seems to work fine) and then try to attach to the text input component I get error. ie: signersArr[0].primaryEmail for the text input I get a non existent qodly source err? Am I missing something? or should I just use the 5 objects instead of 1 collection of objects to hold the signer data?
Hello Robert,
Currently, collections cannot be directly accessed using an index, such as signersArr[0].primaryEmail, since referencing individual elements of a collection explicitly in bindings is not supported.
Therefore, what you did is the right approach. If you only need five signers as objects, using five separate objects is the simplest and most reliable solution.
Additionally, if you extract the object from the collection, you only need to initialize it and save it, and it will automatically be added back to the collection, but in both cases, you will need to handle the collection through code in order to save the data to your database.
Alternatively, if needed, depending on your use case, if you can use entities to directly save data to your database, it will only require you to use one qodlysource of type entity, referring to you Signer dataclass for example, initialize it, then bind your text inputs with the wanted properties, save that entity with a button click, and immediately create a new entity after each save. This approach enables a dynamic saving process, to handle an unlimited number of signers as needed.