Need help adding/modifying built in property for text field

I need help making a text box not enter data when it loses focus. According to Vision - Text Field - Ignition User Manual 8.1 - Ignition Documentation all I need to do is set commitOnFocusLost to false. However, this doesn't show up in my property editor. I tried adding it manually without success. I also tried scripting on show and on focus to modify self.props.commitOnFocusLost but I couldn't get it to work. Ive spent a few hours on this and searched everywhere but I can't find what I need. Your help is greatly appreciated.

Well you are showing a perspective view but trying to use a vision component. That's why you can't find it. You may want to read up on the perspective components and see if you can find something similar.

3 Likes

Can you describe in more details the behavior you need ?
I'm not sure if

  1. you're committing the data in some way and you need to stop it from happening when the field loses focus, in which case you'll need to rework the way you do it - explain what you do and we'll help fix it.
  2. you want what unchecking deferUpdates does.
  3. something else entirely ?

You'll also need to make it clear if you want to be using vision or perspective.
Your screenshot shows perspective, but the doc you linked is for vision as @bschroeder pointed out, and the thread is tagged vision.

2 Likes

I think I found a work-around. I also need to do more research on vision vs perspective I didn't know there were two options here and I need to learn the difference. I am new to this which is why it is taking me so long, not trying to imply Ignition is not intuitive, just wanted to express I have done some due diligence and not just posting without researching on my end. I am using the box as a validation to ensure operators are putting the correct part onto a cart before allowing recipe steps to load for the operators. If the field doesn't match I wrote a script to clear the input. So as long as they dont put in a partial and then try to come back to it it should be fine for what I need. I might give them a scanner too which will make it easier and less likely to lose focus before completing the string. I will look into deferUpdates and trying to get a vision version running as well. Thank you for your time this does help me out a lot.

Update, using the vision version seems to be going a lot better for me. This is much more close to the videos in the IU. Thanks for the guidance. I didn't know there was a difference and this was my fault.

Hey learning is a journey. Just do some diligence in learning the basic overview of each product before you go all on on one to make sure that it fits your end goals.

2 Likes

I suggest you keep reading some more about the differences between vision and perspective before settling down. The choice shouldn't be based on a text field property :wink:

edit: well.. pretty much what @bschroeder said 10 minutes before me, then.

1 Like