cancel
Showing results for 
Search instead for 
Did you mean: 
Nintex Newbie

Appling Rule to Percentage field not working

Hi

In my list is a number field formated as %. Request has been made to apply a background color to the form field if the value is above a certain %. Applying a formatting rule should do the trick. Condition: [field]>[number]. It does work for fields not formatted as percentage. But I can't get it to work for % fields. While in edit mode the value is apparently only recognized as number and the color displays. When saved and in view mode, the rule is not applying.

Any suggestion to get around this?

Thanks!

Labels: (1)
0 Kudos
Reply
3 Replies
Highlighted
Automation Master
Automation Master

Re: Appling Rule to Percentage field not working

there are two problems with percentage fields

- they come in into form including percentage

- they are formatted with decimal separator (if configured to include decimals) acc. current user's locale which might mean decimal separator is not a dot

they both prevent onverting percentage value into a number and perform numeric comparison

I ended up using formula like this for comparisons

replace(replace({Self},"%",""),NWF.FormFiller.Functions.DecimalSymbol,".") > [number]
0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Appling Rule to Percentage field not working

Hi Marian

Thanks for your reply. Your solution is surely a help if you want to do further calculations with the figure.

I got it working this morning by applying 2 different rules

- one for Edit mode where the figure is still recognized as a number only: [field] >90. This rule helps to color the figure already while filling the form.

- one for View mode where the figure seems to be treated more like text: [field] >"90 %".

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Appling Rule to Percentage field not working

my above formula works in both modes, so you do not need two rules

I would be careful with comparing texts!

- percent sign need not always be formatted the same way, eg. sometimes there is a space between the sign and number like in your case, sometimes not

- when comparing strings, "9 %" is greater then "50 %"

0 Kudos
Reply