Reply To: Calling JS function from a Rule

Forums Dynamic Forms for SharePoint Calling JS function from a Rule Reply To: Calling JS function from a Rule

#26226
Leo
Participant

Hi Alex,
The Field’s internal names that I am trying to retrieve using get/setFieldValue are ‘ApprovalName’ & ‘ApprovalDate’. They both exist in the Fields tab on DFFS. Their Field Types are ‘SPFieldUser’ & ‘SPFieldDateTime’ respectively. The intent is that these fields get updated with the user name and timestamp when the user clicks an approve button. These two fields are therefore not visible when the user clicks on the edit icon from within the list, I have attached a screenshot from the Tabs config in DFFS if it helps.

The issue is that neither getFieldValue nor setFieldValue seem to work correctly for these fields. I have tried getFieldValue on standard text fields and it works great but I cannot seem to have either get or setFieldValue work for these Date & name fields.

In List Settings, ApprovalName is type ‘Person or Group’ and ApprovalDate is type ‘Date and Time’.

I am calling the functions as follows:
`getFieldValue(‘ApprovalName’);
getFieldValue(‘ApprovalDate’);
setFieldValue(‘ApprovalName’,’Name that I want to set’);
setFieldValue(‘ApprovalDate’,[’07/23/2019′]);`

Finally, I have attached a pic with what I see when I view source on the Dffs form.

Thank you