Unable to prpopulate FDM data in AEM Forms. | Community
Skip to main content
surya1
Level 2
Nov 27, 2020 3:36 PM UTC
Question

Unable to prpopulate FDM data in AEM Forms.

Hi Team,

There is an issue already cracked my head. 

I have used an API service https://experienceleague.adobe.com/docs/experience-manager-65/forms/adaptive-forms-advanced-authoring/invoke-form-data-model-services.html?lang=en#api-to-invoke-form-data-model-service-from-adaptive-forms

to get data in forms fields. Used this form initialize event. with the required coding. But its not working. What exactly the issue here not sure. Can anyone give me some idea?

Regards,

Surya

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

7 replies

Mayank_Gandhi
Employee
Dec 8, 2020 2:18 PM UTC

@surya1  Is this working now?

 

- Mayank Gandhi

Translate
Mayank_Gandhi
Employee
Nov 30, 2020 2:43 PM UTC

@surya1 If it's working in the test model there is a limited chance it will not work in the form. Make sure the type of input and response you are getting. 

Translate
Level 8
Nov 27, 2020 4:58 PM UTC

Ok 

what is your use case?

 

Translate
Level 8
Nov 27, 2020 3:49 PM UTC

Is your form data model working when you test it using the form model editor? If yes

try it invoking on the click event of a button

If the second test is successful then try using the code

Translate
surya1
surya1Author
Level 2
Nov 27, 2020 4:32 PM UTC
Its not working on click event. Using the below code console.log("DBFetchStarting"); var operationInfo = { "formDataModelId": "/content/dam/formsanddocuments-fdm/userprofiledata", "operationTitle": "get", "operationName": "get" }; console.log("operationInfo" + operationInfo); var inputs = { "PersonID" : "F3TCYHHSG7Q7TWXDPFDITEOG64JT8H2Q" }; console.log("DBFetchStartingstart13"); var outputs = { "LastName" : LastName, "FirstName" : FirstName }; guidelib.dataIntegrationUtils.executeOperation(operationInfo, inputs, outputs); console.log("outputs:"+FirstName); }
Translate