- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 05:03 PM - edited ‎10-13-2022 05:05 PM
I created a simple UI Policy for a custom table that triggers a policy action when a decimal field is between 3500 and 10000, but it is always evaluating to false. A different UI policy with the condition greater than or is 10000 on the same field is working without issues.
I want to use a UI Policy as it is the best mechanism (at my skill level) to provide the desired behavior. Is something wrong with the between and operator in the filter conditions of UI Policies? Is there a workaround?
I will be grateful for any help or guidance.
Kind Regards,
Woody
<<<<<<<<<<<<snippet below is running the debug ui policy module, copied from the client console<<<<<<<<<
GlideFieldPolicy: Running "0260 OCIO Msg above 3500 must check over 3500 field" UI Policy on "sys_ui_policy" table
js_includes_concourse.jsx?v=08-31-2022_1215&lp=Tue_Sep_13_22_19_51_PDT_2022&c=41_2437:24138 GlideFieldPolicy: >>> evaluating conditions:
js_includes_concourse.jsx?v=08-31-2022_1215&lp=Tue_Sep_13_22_19_51_PDT_2022&c=41_2437:24138 GlideFieldPolicy: > u_pur_req_total_decimal's value of "4,005" with the condition( BETWEEN 3,500.01@9,999.99) evaluates to FALSE
js_includes_concourse.jsx?v=08-31-2022_1215&lp=Tue_Sep_13_22_19_51_PDT_2022&c=41_2437:24138 GlideFieldPolicy: <<< condition exited with: FALSE
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 06:22 PM
Confirmed that it is the between operator that doesn't like to evaluate correctly. Maybe you can mimick the functionality by doing a greater than and less than in the same condition?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 05:20 PM
Do you have both UI policies running at the same time?
If so your ui policy that is greater than or is 10000 may have "reverse if false" set to "true" and causing the conflict between the two ui policy actions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 06:02 PM - edited ‎10-13-2022 06:11 PM
Thanks Mike this is helpful guidance, but I actually assign order numbers to all of my ui policies, the working file is 240 and the broken file is 260 to de-conflict. I think it is the between operator, because if I change it to "greater than or is" then it works.
Right now I am looking for a workaround that will enable me to use the is operator but put some javascript in the parameter field in place of a number, something like this
u_line_item_totalBETWEEN3500@9999.99^ORu_request_totalBETWEEN3500@9999.99^EQ
When I look in the UI Policies in List View, the Conditions column for this file contains the string:
u_purchase_request_totalBETWEENjavascript:global.getCurrencyFilter(‘x_scope_table’,’u_purchase_request_total’,’USD;3500’)@javascript:global.getCurrencyFilter(‘x_scope_table’,’u_purchase_request_total’,’USD;10000^EQ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 06:22 PM
Confirmed that it is the between operator that doesn't like to evaluate correctly. Maybe you can mimick the functionality by doing a greater than and less than in the same condition?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 06:45 PM
Well done Mike! I thought I had tried that earlier without success but at 9:44PM I'll take it! Thank you for your persistence with me!
Kind Regards,
Woody