Skip to main content
Nintex Community Menu Bar
Question

Ability to check if a field has already been rendered

  • July 10, 2024
  • 2 replies
  • 19 views

Forum|alt.badge.img+1

I have a field in my page and I am overriding the handleChange method for the field with some fairly complex behavior.

Part of this behavior depends on the data in another model. So I need to be able to call the snippet that sets up my field when certain events are thrown.

The issue is right now, I am getting duplicate instances of the field (and the entire editor it belongs to for that matter - see attached screen grab).

I belive this is because I am calling render multiple times.

So what I need is logic to be able to tell if the field has been previously rendered or not, and only render the first time if that makes sense, and simply override the handleChange function otherwise.

Any help on this would be appreciated.

2 replies

Forum|alt.badge.img+1

Never mind, got it sorted. It was not the multiple field.render() calls that was causing this.
I simply had been creating new rows in the model!

Mystery solved.


annajosephine
Nintex Employee
Forum|alt.badge.img+18
  • Nintex Employee
  • July 10, 2024

Thanks for letting us know, Hamza!