Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating a parameter from a formula field

Status
Not open for further replies.

ABetha

Programmer
Jul 14, 2010
35
US
I wanted to know if it was possible to create a parameter based on a formula
 
This isn't enough information. Do you mean you want to evaluate a formula against a parameter? Or do you mean you want to create a picklist for a parameter that is based on a formula? Please be more specific and provide some samples.

-LB
 
Hi,
Can you explain further what you want to accomplish with this?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I created a formula called Quarter the contents are below:

if val({vSerialNo.PeriodMonth}) < 4 then
"First Quarter"
else if
val({vSerialNo.PeriodMonth})< 6 and val({vSerialNo.PeriodMonth}) > 3 then
"Second Quarter"
else if
val({vSerialNo.PeriodMonth})< 10 and val({vSerialNo.PeriodMonth}) > 6 then
"Third Quarter"
else if
val({vSerialNo.PeriodMonth}) >9 and val({vSerialNo.PeriodMonth}) <= 12 then
"Fourth Quarter"

I want to have a parameter so the user can select the Quarter that they would like to see.
 
I would just set up the quarter parameter as a number parameter with values of 1 to 4 and add descriptions to each "First Quarter", etc. Then set "show description only" to true. In your record selection formula use:

(
(
{?Quarter} = 1 and
val({vSerialNo.PeriodMonth}) in 1 to 3
) or
(
{?Quarter} = 2 and
val({vSerialNo.PeriodMonth}) in 4 to 6
) or
(
{?Quarter} = 3 and
val({vSerialNo.PeriodMonth}) in 7 to 9
) or
(
{?Quarter} = 4 and
val({vSerialNo.PeriodMonth}) in 10 to 12
)
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top