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

Question

Question

How to populate a field in a table from a previous field in a collection

asked on February 14

Hello, 

I have a form that has a collection (Funding Accounts). The Reason Code field in the collection is a drop down box ( values of 1,2,3,4)  another field in that collection is an account number from a lookup that is being assigned to the selected value of the dropdown box. 

Now, Below that are four more tables (RC1 - RC4)  

In RC1 need to display the account number collected from the collection which is assigned Reason Code 1

i'll repeat this for RC2-RC4

0 0

Replies

replied on February 16 Show version history

Hi Marce

Seeing that Funding Accounts is a collection, what should happen if the user adds to that collection and chooses a reason code of 1 for that section as well?

It is also possible that reason 1 may not be the first section (row) of the collection, correct?

0 0
replied on February 17

Hi Steve,

So for this form, an employee fills out the mileage form then submits it (Initiator does not see anything on the screenshot attached).  I have the default Reason code set to fill as "1" Then the form goes to the supervisor who then sets up the department account for this employee and assigns that RC1.  If he decides that some of the miles belong to a different account, he then sets up RC2, RC3 or RC4 and assigns those accounts accordingly and matches the mileage Reason Code to match.  THis way when the form gets routed to the business office, they know exactly how to split up the mileage and what accounts to charge it to.  The only time a supervisor would assign multiple codes is like i mentioned, if they did not want all of the mileage to come from the department account.

0 0
replied on February 17 Show version history

Hi Marce. If I understand right, this is how I would approach it. Step 1. In you Funding Account table, change you Reason Code field to a number field, and enter the following formula in the advanced tab =Row(). Set the field to Read Only. Now what should happen is the 1st Row will always be one, as you add rows to that table it will automatically increment 1,2,3,4 as it is the row number of the row.

Step 2. In the account column in each of the RC tables, put in the following formula.

example: For RC1 table

=(INDEX(Funding_Accounts.Acct#,1)

example : For RC2 table

=(INDEX(Funding_Accounts.Acct#,2)

This formula reads as, get the value from the Fund Accounts Table, Accts Field, from the 2nd row.
 

You may need to have an if statement as well to account for a field error if the Row doesn’t exist such as

=IF(INDEX(Funding_Accounts.ReasonCode,1)=“”, “”,INDEX(Funding_Accounts.Acct#,1))
 

You will have to ensure the correct variable are used in you formula, as they may not match your Collection field labels

Hope this helps

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.