Skip to main content
Nintex Community Menu Bar
Question

Model condition based on formula

  • July 10, 2024
  • 1 reply
  • 2 views

Forum|alt.badge.img+1

I have a Text Field “Year” and I want to add condition on model
based on dynamic year value (Current Year + 1). How I can achieve this.

I tried creating a formula field on object with option “field from another model”, but it didn’t work.

please help!

This topic has been closed for replies.

1 reply

Forum|alt.badge.img+18
  • 2192 replies
  • July 10, 2024

There might be an easier way, but you can do this with inline javascript on pageload.

Set your model to not load data on pageload, set up your condition filterable default on, and then add some inline javascript with something like this in it’s contents:

$(document.body).one('pageload',function(){<br>var model = skuid.$M('MyModel'),<br>condition = model.conditions.getConditionByName('MyCondition');<br>condition.value = new Date().getFullYear();<br>model.updateData();<br>});