Up Down arrows should advance the number based on tag decimal position

Hello,
I am using Ignition Perspective version 8.0.14 and Edge perspective 8.0.14.
For “Numeric Entry Field” component I want to increment the value based on tag decimal position.
using Up Down arrows. i.e Up Down arrows should advance the number after the decimal point, currently arrow advances full digit.
I want to increment value from 140 to 140.1 140.2 so on.
image

Please suggest.
Thanks in Advance.

In the propertyChange script of your spinner component:

# Adjust step size in spinner to match the format string.
# Note: This will only work with zeroes in the format string.
#       Hashes are ignored.
if event.propertyName == 'editor':
	import re
	formatIn = event.source.numberFormat
	matches = re.search('\.0+', formatIn)
	if matches == None:
		event.source.stepSize = 1
	else:
		event.source.stepSize = 10**-(matches.group().count('0'))

Hi Jordan,

Your answer is for Vision right? I dont think perspective has propertyChange scripts.

Trying to figure this same problem out today.

Hey, don’t ruin it with facts…

Facts… annoying aren’t they :crazy_face:

2 Likes

Anyone else have trouble with their spinners? Mine doesn’t seem to adjust the value at all.

I am also running into this problem in Perspective. I don’t necessarily need the spinner to adjust based on the format string, but it would be great to be able to modify it to adjust by 0.1 instead of 1. @ajay_phadnis and @mcarritt1 were you ever able to find a solution?

We recently attempted to supply a step value for the spinners in Perspective (so that a Designer could increment/decrement displayed value by .x), but Development of this feature encountered issues with Safari.

We found that while a step could be used for Chrome/Firefox browsers, we could not get the step to work on Safari (due to Safari implementation issues).

The result was something like this:
spinnerStep: 0.6
value: 0.4

Chrome/Firefox
A press of the “up” spinner would result in a value of 1.0

Safari:
A press of the “up” spinner would result in a value of 0.6, and the value would increment by 0.6 from then onward (1.2, 1.8).

Since we couldn’t get the same behavior across all browsers and this actually changed a value which a system could be dependent on, we paused development until we could take the time to get Safari working correctly. This is unlikely to happen for 8.1.6, but it’s possible. Stay tuned.

1 Like