Skip to main content
Nintex Community Menu Bar
Question

How to set value of a dynamic field?

  • July 10, 2024
  • 2 replies
  • 8 views

Forum|alt.badge.img+3

Any one know how to set up value to a dynamic field. I have the function where field name would be sent as parameter and I do need to set value there.

Here is an example
function SetValue(params, Name){
$ = skuid.$;
var fieldName =params.model.getField(Name);
// var Mytext = do my task
if(params.model.getRowById(params.row.Id)[fieldName] !== skuid.$(‘.RichTextField).prop(‘innerHTML’)){            

     params.model.updateRow(params.model.getRowById(params.row.Id),{ fieldName : ‘Mytext’});
            skuid.$(’.RichTextField div.nx-richtext-input’).focus();
        }

}

This topic has been closed for replies.

2 replies

Forum|alt.badge.img+18

I don’t think you need to get the reference to the entire field object. You should be able to just use the field name

if(params.row[Name] !== skuid.$(‘.RichTextField).prop(‘innerHTML’)){            

     params.model.updateRow(params.row, Name, ‘Mytext’);
            skuid.$(‘.RichTextField div.nx-richtext-input’).focus();
        }


Forum|alt.badge.img+3

Thanks Matt,
it works perfect…