Hi,

I have an application structure that has applicants record list in it.

One of my use case is that I will add another record in that list but at the same time, I need to update a field of another record on that list as well.

Basically here, when I create Applicant 2, I need to update Applicant 1's ApplicantGuarantor to Applicant 2's Id. I know you'd think this is easier but I am working with structures in the orchestration layer. So I need to work with ListAppends and ListIndexOfs to make this happen. This is so that I will just be passing the Application structure to the service module after I have updated the correct data.

Edit: I forgot to state the actual problem. I can't think of the logic or function that can update that ApplicantGuarantor of Applicant 1 when I append that Applicant 2 on the record list. ListIndexOf only returns position of a record on the list, but you can't use that to update the specific record. The only use of ListIndexOf on my logic is to ListRemove to ListAppend a new updated record as here:


Regards,

JC

I think I got it...


SyntaxEditor Code Snippet

GetApplicationByApplicationNumber.Application_Struct.Applicants[ListIndexOf2.Position].GuarantorApplicantGUID
Solution

Hi JC,

You can update a record in the list with current position. Something like that:

Application.List[1].ACACode = "xpto"

The number "1" is your position (maybe is the result of ListIndexOf - ListIndexOfApplication.Position). Is that what you want?


Best regards

Solution

Juan Carlos Elorde wrote:

I think I got it...


SyntaxEditor Code Snippet

GetApplicationByApplicationNumber.Application_Struct.Applicants[ListIndexOf2.Position].GuarantorApplicantGUID

Yes, is it :)