[Last Call] Learn how to a build a cloud-first strategyRegister Now


how to compute values in chain

Posted on 2011-10-03
Medium Priority
Last Modified: 2012-05-12
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.

Question by:KoolAsIce
  • 2
  • 2
LVL 28

Expert Comment

ID: 36907966
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.

Author Comment

ID: 36908316
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.

Expert Comment

ID: 36910439
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?

Author Comment

ID: 36911557
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 :)  


Accepted Solution

nsyyoung earned 2000 total points
ID: 36911678
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.


Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question