You are viewing limited content. For full access, please sign in.

Question

Question

Search for a value in one field of a collection and return the value of another field in that same row

asked on March 21, 2024

I have a collection called ROL_Roles_col and I would like to find the row where the value of the "Role" field is "Beneficiary", and get the index of that row (so that I can the value of another field in that row).  I want to display this value in a text box that is outside of the collection.  If I can get the index of the row with the value Beneficiary, I am assuming I can then use CHOOSE() to return the value?

So for example in the row that contains the role "Beneficiary", I would like to return the value from the "Address 1" field.

 

Thank you :)

0 0

Answer

SELECTED ANSWER
replied on March 21, 2024 Show version history

I haven't tested it, but maybe you could have a hidden field in your collection that has a formula like this in it: 

=IF(INDEX(ROL_Roles_col.Role,ROW())="Beneficiary",ROW(),0)

This returns a 0 unless the Role field on the same row is equal to Beneficiary, at which point it returns the row number.

Then the field outside the collection just needs to get the MAX value from the collection, at which point you have the index of the last row in the collection where Role="Beneficiary".

0 0
replied on March 21, 2024

Hi Matthew, yes that worked for me.  Thank you very much for the help :)

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.