Skip to main content
Nintex Community Menu Bar
Question

Javascript to render a field based on picklist old & new value

  • July 10, 2024
  • 2 replies
  • 3 views
  • Translate

Forum|alt.badge.img+2

I am looking for a javascript to render a field based on picklist field vales (mainly old & new picklist values)


I am aware of standard way of conditional rendering but my requirement bit different, we have a picklist field 'Status' with 'Active'& 'Inactive' status & other field 'Deactivation' which is a text field and should be render based on 'status' value (Status= Inactive) this can be done in usual rendering condition but in my case whenever a new record creates the default status will be "Inactive" after several approval (flow is like 'Inactive' ->'Rejection'->inactive (when resubmit)-> 'Active')status will updated to 'Active'.

As per the requirement, 'Deactivation' field should be shown on page when 'Status'=Inactive, with the regular rendering condition 'Deactivation' field is showing all the time on detail page as per the condition, I want to check the status field old value as 'Active' and new value as 'Inactive' then only render my 'Deactivation' field.

Both field's (Status & Deactivation) are in same model

Thanks

Did this topic help you find an answer to your question?
This topic has been closed for comments

Forum|alt.badge.img+9

Hi Kailas,

If you haven’t already done so, I would recommend experimenting with other render conditions like model properties or row properties. With the right combination of conditions and field values, you may not need any scripting for this. 
Some options to try:

  • “Has data rows”
  • “Is new record”
  • “Has unsaved changes”
If the records in question are not new, you might try adding a render condition where the row “Is new record” is false, and pair it with “Has unsaved changes.” You can also check for field values, as you’ve described, so I’d hope that combining a few of these options could get you where you need.

Translate

Forum|alt.badge.img+2
  • July 10, 2024

Hi Mark,

Thanks for your suggestion, as you said we added one more picklist field in the condition which solved my requirement.

Thanks

Translate

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings