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

Question

Question

Pull specific field value in a collection from a radio button

asked on August 19, 2022

I have a form that has a collection. When needed, the process loops back to the form for additional authorization. 

Here is my loop.

 

Here is the collection.

When the first person fills it out, the process works fine. I used the "Is additional authorization required?" response to assist me in looping the process back. If the answer is yes, a second user will receive the form to complete another row in the collection.

Once the second user submits the form, I run into a problem. If the answer is the same, it works. If the answer is not the same, the process is having trouble determining which route to take. The variable is maintaining both variables and causing the process to suspend.

I tried making a field (called Routing decision) outside of the collection that would update with the last value (using formulas), but I cannot get that to work either. I've tried indexing and rows, but still nothing. Right now, I have two formulas below which will pull both values, bit I can't get it to pull the field info from last row in the collection.

=IF(SubmitApproveInfo.Additional_authorization_required="Yes","Yes","No")

=IF(SubmitApproveInfo.Additional_authorization_required<>"",SubmitApproveInfo.Additional_authorization_required,)

 

When I enter yes in the first set and No in the second set, I get "Yes,No".

I've done similar form before, but none with collections.

Any ideas? I'm not set on doing this any particualr way, so feel free to think outside the box. Keep in mind that I am not a skilled coder, so I would prefer to do it wilth formulas if possible, but I have worked with code with detailed instructions.

 

 

0 0

Answer

SELECTED ANSWER
replied on August 19, 2022 Show version history

The problem you're running into is that a collection can't be referenced the same as a single value variable; it will be okay when there's only one value, but when you have multiple you need to specify which value you want to use via indexes.

The problem you're having with your "Routing Decision" field is that you're not applying an index so it is looking at the entire array/list of values.

What you want based on your process is to get the latest value in the collection.

To do that, you could use COUNTIF to get a count of the populated values for a particular variable in the collection, and then feed that back into the INDEX function to get the last one, but you'd have to make that field required or use a different calculation since it wouldn't count a blank value.

In the example, just make sure to choose your actual variables from the > menu.

The following gets a count of all the radio button values in the collection that aren't blank

COUNTIF(Collection.Radio_Button,"<>")

You then feed that into INDEX(column, row)

=INDEX(Collection.Radio_Button,COUNTIF(Collection.Radio_Button,"<>"))

And as long as all the radio buttons have a selection, it will show the value of the last one.

There's other stuff you can do but this is probably the simplest option.

2 0
replied on August 22, 2022

Thanks. Your solution was along the same thought process I was trying to accomplish. I just wasn't able to get there myself.

Appreciate your help. smiley

0 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.