Metius
asked on
Inserting Calculated Result after Get(lastmessagechoice)
I'm running a script which asks the user to select 1 of 3 choices from the custom dialog box. I want to set the field value based on the response. I'm using - If get(lastmessagechoice) = "1" select field = "order". However the result I get is that a "0" is inserted into the field rather then "order"
Appreciate any help
Thanks
Appreciate any help
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the response .... the case function is very neat. Thanks
indeed, but that's more clicks!
It sounds like the field is defined as a number rather than a text field. That will cause it to display a zero when you insert a text value into it. Change the field's definition to be a text field.
Another suggestion:
Instead of using a series of script steps to check the lastmessagechoice and set the field, you can do the whole thing in a single step using the a set field script step to assign the field the value of the Case() function, like this:
Case ( get(LastMessageChoice) = 1; "Order"; get(LastMessageChoice) = 2; "Second Option"; get(LastMessageChoice) = 3; "Third Option)