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 / April 2007

Tip: Looking for answers? Try searching our database.

How do I assign a value to a text field based on values in other f

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
brettopp - 02 Apr 2007 21:58 GMT
I think my question is simple, but being from an Excel background, trying to
convert my Excel way of doing things to InfoPath is messing me up.  Here is
what I want to do:

I have a text field named "WWAccountVolume".  In this field, I would like to
populate a percentage based on data listed in three other fields ("DealType",
"TotalDealValue", and "WWActVolCheckbox" -- this last field is a True/False
checkbox).  There are three arguments total that drive the behavior of field
"WWAccountVolume", as listed below.

Argument #1
IF DealType = "Global Invoicing -- Formal" AND TotalDealValue < 2000000 AND
WWActVolCheckbox = "TRUE" THEN WWAccountVolume = "0%"

Argument #2
IF DealType = "Global Invoicing -- Formal" AND TotalDealValue >= 2000000 AND
TotalDealValue <5000000 AND WWActVolCheckbox = "TRUE" THEN WWAccountVolume =
"2%"

Argument #3
IF DealType = "Global Invoicing -- Formal" AND TotalDealValue >5000000 AND
WWActVolCheckbox = "TRUE" THEN WWAccountVolume = "4%"

I know how to do this in Excel very easily, but I am stumped on how to do it
in InfoPath.
S.Y.M. Wong-A-Ton - 03 Apr 2007 09:46 GMT
You need to add 3 rules on each of the fields that can change the value of
the "WWAccountVolume" field. These rules must have an Action that sets the
value of the "WWAccountVolume" field to 0% (rule 1), 2% (rule 2), or 4% (rule
3). Once you've created the rules, you can add a Condition on each rule to
simulate your IF....THEN logic for each rule. You may find the following
documentation helpful:

Add a rule:
http://office.microsoft.com/en-us/infopath/HP011002671033.aspx

Set a field's value:
http://office.microsoft.com/en-us/infopath/HP011002661033.aspx
---
S.Y.M. Wong-A-Ton

> I think my question is simple, but being from an Excel background, trying to
> convert my Excel way of doing things to InfoPath is messing me up.  Here is
[quoted text clipped - 21 lines]
> I know how to do this in Excel very easily, but I am stumped on how to do it
> in InfoPath.
samuel - 04 Apr 2007 16:22 GMT
This is what I needed. Thanks for the article.

However, I'm using a text box to display a currency amount to send back to
the local database. It displays the box as invalid data.

Is there something I"m missing?

> You need to add 3 rules on each of the fields that can change the value of
> the "WWAccountVolume" field. These rules must have an Action that sets the
[quoted text clipped - 36 lines]
> > I know how to do this in Excel very easily, but I am stumped on how to do it
> > in InfoPath.
S.Y.M. Wong-A-Ton - 05 Apr 2007 11:32 GMT
I'm not sure what you're talking about. What data type is the text box set
to? Give an example of the currency you're trying to enter into the text box
and which displays as invalid data. And what is your regional setting for
displaying numbers and currencies on your PC?
---
S.Y.M. Wong-A-Ton

> This is what I needed. Thanks for the article.
>
[quoted text clipped - 43 lines]
> > > I know how to do this in Excel very easily, but I am stumped on how to do it
> > > in InfoPath.
samuel - 05 Apr 2007 16:38 GMT
the field in my access table is data type - number (single)

the field in infopath has binding greyed out. i can format the infopath to
be currency, but the form shows as invalid data, and multiple decimal places.

> I'm not sure what you're talking about. What data type is the text box set
> to? Give an example of the currency you're trying to enter into the text box
[quoted text clipped - 50 lines]
> > > > I know how to do this in Excel very easily, but I am stumped on how to do it
> > > > in InfoPath.
S.Y.M. Wong-A-Ton - 12 Apr 2007 06:54 GMT
The field is greyed out, because InfoPath created it for you and it is bound
to the database; you cannot do much about that.

I've tried re-creating your scenario and have had no issues. I used a number
field (single) in my Access table like you did. This was converted to an
optional_float field in InfoPath. I then formatted to a currency (English
(New Zealand) in my case), set my Decimal places to 2, removed the tick from
"Use a digit grouping symbol (,), and entered a currency like 31.90 with no
problem. Submission to the database went smoothly too.

If you use a format, make sure that you're entering data as dictated by that
format, otherwise it will display as invalid data. If your Decimal places is
set to "Auto", you'll get multiple decimal places in your currencies.
InfoPath shows inaccuracies where displaying multiple decimal places is
concerned.

Hope this helps.
---
S.Y.M. Wong-A-Ton

> the field in my access table is data type - number (single)
>
[quoted text clipped - 55 lines]
> > > > > I know how to do this in Excel very easily, but I am stumped on how to do it
> > > > > in InfoPath.
 
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.