Calculations in Infopath

R

RJ

I am far by all means the worst when it comes to figuring out math and
expressions.... Can someone help me please?

All I need to do is something like this...

Field2* Field3 or Field1*Field3 = Set value in field4 it is one or the
other, how do i get the form to see if something when one field is blank but
the other is not blank and calculate it and set the value, Vice Versa. I
have tried if condition = if present then sum the value etc..nothing is
working. Can someone direct me to the right place. Thank you.
 
S

Stripe-man

I am far by all means the worst when it comes to figuring out math and
expressions.... Can someone help me please?

All I need to do is something like this...

Field2* Field3 or Field1*Field3 = Set value in field4   it is one or the
other, how do i get the form to see if something when one field is blank but
the other is not blank and calculate it and set the value, Vice Versa.   I
have tried if condition = if present then sum the value etc..nothing is
working.  Can someone direct me to the right place. Thank you.

Well.. im farily new at this as well.. and I am not really sure
what exactly you are looking for..i think one option you have is to do
this:
create two additional fields (not for display but add them as a data
source just dont add them to your layout).
lets say .. call one
sum_fieldsetOne its forumual should look like this: sum(field2) *
sum(field3)
sum_fieldsetTwo and its should look like this : sum(field1) * sum
(field3)
then on field4 set a rule to met a condiction: if sum_fieldsetOne is
NOT equal to 0 then add an action item to set field4 value to
sum_fieldsetOne and then add another rule or condition (depending on
your need) to:
if sum_fieldsetTwo is NOT equal to 0 then add an action item to set
field4 value to sum_fieldsetTwo

OR

sum_fieldsetOne is equal to '0' then add an action item to set field4
value to sum_fieldsetTwo
 
S

Swathi (GGK Tech)

Hi,
Add the rule to set the values with the below conditions.
1.If field2 is not blank and field3 is not blank and Field2* Field3 is not
equal to zero. Then set field4 value as Field2* Field3.
2.The second rule should be with the conditions as if field1 is not blank
and field3 is not blank and Field1*Field3 is not equal to zero then set the
field4 value as Field1*Field3.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top