how to compute values in chain

Hello experts,

Here is my senario, let's assume i have three controls. One is dropdown list which gets data from database. Then there is another control which is computed using some formula based on dropdown list value. Finally there is another control which is computed based off second control. This is just an example, mine is little more complex but this will give me a idea. Above senario can be reprensented as follows:  

Dropdown list (driven from database) => Control one computed based on drop down => Control two computed based on control one

I didn't find anything like label or anything in infopath. I am bit new to Infopath, please help.
     

KoolAsIceAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Clay FoxDirector of Business IntegrationCommented:
To do this you often use the filter functionality.

So select a field where value equals the one chosen in the drop down.

Typically called cascading dropdowns.  You break down repeating data through subsequent selections.

www.infopathdev.com has some tutorials on cascading dropdowns.
0
KoolAsIceAuthor Commented:
Hi Clayfox,

thanks for your answer but I am not looking for a cascading dropdowns. Instead im looking for chain of computation.

For example, dropdown list data is coming from database. However, second control takes that data and does something like multiply that dropdown number with something. Finally there is another control which takes the value of second control and divides it by some number to yield a result for third control and so on.

Further, once data is populated in third control and now if the value of dropdown list is changed, then second control and third control value should change automatically.

Please let me know if you have any ideas.
0
nsyyoungCommented:
Hi Kool, try this:

If I want to multiply field 1 by 4 and divide that result by 3:

field1 is the dropdown value
field2 formula is field1 * 4
field3 formula is field2 / 3

Make sure there is a space on either side of the /, lest InfoPath consider it a separator instead of a division operator.

Does that help?
0
KoolAsIceAuthor Commented:
hi nsyyoung,

Thank you for your solution. I already did something like that using infopath control (fx). However, when I do so, once field1 dropdown value is changed after first computation, field2 and field3 doesn't seem to change automatically.

Also I am wondering, if I can use any other controls beside (fx) for chain computation like Label (but I didn't find any Label infopath :)  

 
0
nsyyoungCommented:
There's no "label" control.

Make sure the box by "Update this value when the result of the formula is recalculated" (in the Default Value section) is checked.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.