Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / January 2008

Tip: Looking for answers? Try searching our database.

Rule needs if statement to test two values before filling a test b

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
c9ola - 23 Jan 2008 21:10 GMT
I have 2 independent fields on a form:
A (Date)
B (TextO
The value of both of these together will determine the value of "C," a text
box.   I need an "if" statement but how does that work in the Rules section
of a text box?  BTW . . . field "C" is read-only and can not be changed by a
user.

Example:

If A = "Life" then
   If  B between 1/1/2008 and 3/31/2008 then
      C = "1Q 2008"
   else if B between 4/1/2008 and 7/31/2008 then
      C = "2Q 2008" ......................
  else if A = "CCC" then
      If B between 1/1/2008 and 2/29/2008 then
          C = "1Q 2008"
      else if B between 3/1/2008 and 6/30/2008 then
          C = "2Q 2008"
  end if
end if

If there's a better way to do this, I'm open for that as well, but the
bottom line is - where and how do you write a rule that will take both A and
B into account and then assign a value to C?  Hope this makes sense.  Thank
you.
Signature

krh

S.Y.M. Wong-A-Ton - 29 Jan 2008 08:56 GMT
You can create a rule for each if statement except the first one, and add
Conditions on the rules. So the first rule might look something like the
following:

Action >> set a field's value C = "1Q 2008"
Condition >> A is equal to "Life" AND B is greater than 2008-01-01 AND B is
less than or equal to 2008-03-31

Hopefully you created B as a date field with the Date data type?

To have the rule run when either A or B changes, you will have to add the
rule individually to both fields.
---
S.Y.M. Wong-A-Ton


> I have 2 independent fields on a form:
> A (Date)
[quoted text clipped - 23 lines]
> B into account and then assign a value to C?  Hope this makes sense.  Thank
> you.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.