Entering Formulas into an expression box

K

Katie Pargola

I need to have the expression boxes print something after the prior field is
filled in. I am creating a work book for my husband's diet but based on his
weight loss his points will change. So I am trying to figure out how to make
the expression box type out the necessary points for the week. Below is what
I am trying to write but since I am not familiar with the Infopath formulas i
cant figure out how to write it. I can do it in excel but this is o bviously
not the same.

If weight is greater than or equal to 250, points =28-35; if weight is
between 225 and 249, points = 26-33, if weight is between 200-224, points =
24-3.

I also need to have his weight loss calculated so that would be start weight
- current weight but how do i write that in the expression box?

If someone knows how to write it or can write it for me that would be great.

Thanks
 
K

Kalyan Reddy

Hello Katie Pargola,

You can do so by using Rules on the text box to show values in the
expression boxes when the value in the text box changes
Insert a text box, Open properties and click on Rules
Insert 3 rules on this text box
The formulas are
Rule 1 Condition is . >= 250 action is set Value in expression box
Rule 2 Condition is . <= 249 or . >= 225 action is set Value in expression
box
Rule 3 Condition is . >= 200 or . <= 224 action is set Value in expression
box

And for calculating weight Use this formula on the text box
((field3)) - ((field4)) where field 3 is Start weight and field 4 is Current
weight

I hope these will help You.
 
K

Katie Pargola

I am still having trouble after I put in the rules & conditions - it doesn't
display anything once a number is entered.
 
K

Kalyan Reddy

Hello,

I did this and it worked for me. If you can send ur mail Id I can send u the
template.xsn
 
K

Katie Pargola

(e-mail address removed)

thanks

Kalyan Reddy said:
Hello,

I did this and it worked for me. If you can send ur mail Id I can send u the
template.xsn
 

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