Require a number greater than 0 on string variable on Record Producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Scenario:
- Record Producer for a demand on the ESC
- Q1: Is this a capital project (y/n)
- If yes, make Est Capital Expense mandatory and non-zero.
- Est Capital Expense
- SLT
- Validation Regex=Number
For Est Capital Expense, how do I force users to enter a value >0 to submit this form?
- I have a UI policy to make it mandatory
- I have second UI Policy that I want to clear the value and throw an error if the value is empty or if they enter a zero. (This is what I can't get to work)
Any ideas or options for me to explore?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
NOTE: the goal of this field is to map to the demand form as a currency. Demand manager will update the Est Capital Expense as they work the demand. This will then map to the project when the demand is approved and the project created.
Hope this helps with the context.
Thanks for your time and help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Is your cost field a Floating Point Number? If so, your UI Policy should work. I have the following setup in my PDI.
Then add this to your "if true execute" script:
g_form.clearValue("your_variable");
g_form.showFieldMsg("your_variable", "Cost must be greater than 0","error");
As you mentioned, you get the mandatory part working, this should get the less than 0 part working for you.
Hope this helps.
