Adaptive Form - Form Data Model - Get and use value within the rule editor | Community
Skip to main content
Level 4
April 15, 2022
Solved

Adaptive Form - Form Data Model - Get and use value within the rule editor

  • April 15, 2022
  • 1 reply
  • 620 views

Hello,

 

I have the following form data model get service within my submit button. On pressing submit, there is no issue populating the "statusId" field in the output. However, I want to directly store the output value into a variable declared in the submit button, rather than be stored in the "statusId" field. This way, the value will persist in the variable and can be continuously used within the submit button script. I would appreciate any help on this. Thank you

 

 

 

var operationInfo = { "formDataModelId": "/content/dam/formsanddocuments-fdm/x/yy/zzz/test-name", "operationTitle": "getStatusID", "operationName": "getStatusID" }; var inputs = { "SubmissionType" : submissionType, "Name" : preparerName, "Year" : currentYear }; var outputs = { "StatusID" : statusID }; guidelib.dataIntegrationUtils.executeOperation(operationInfo, inputs, outputs, null, null, this);

 

 

For example:

 

var newStatusId; var operationInfo = { "formDataModelId": "/content/dam/formsanddocuments-fdm/x/yy/zzz/test-name", "operationTitle": "getStatusID", "operationName": "getStatusID" }; var inputs = { "SubmissionType" : submissionType, "Name" : preparerName, "Year" : currentYear }; var outputs = { "StatusID" : newStatusId }; guidelib.dataIntegrationUtils.executeOperation(operationInfo, inputs, outputs, null, null, this);

 

 The returned value should be stored in the newStatusId variable

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by techddx

I was able to resolve my problem. See Step 3 #6 in the following link:

https://github.com/AdobeDocs/experience-manager-65.en/blob/main/help/forms/using/apply-rules-to-adaptive-form-fields.md

1 reply

techddxAuthorAccepted solution
Level 4
April 16, 2022