Populating form data with FDM from a REST Service

Avatar

Avatar
Give Back
Level 1
LeenaJaIN
Level 1

Likes

2 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Give Back
Boost 1
View profile

Avatar
Give Back
Level 1
LeenaJaIN
Level 1

Likes

2 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Give Back
Boost 1
View profile
LeenaJaIN
Level 1

04-06-2020

Hi 

 

I have created a FDM based on REST service.In my Adaptive Form , I created a rule to invoke the FDM service using AuthID input parameter.This should return me a jason response.How do I map this response back to my form, since i am getting null when trying to map in a textField. Also tried to create a variable and mapped into that but receiving null/undefined.

 

When i am directly testing my FDM through Test Service I get a proper response,

 

Kindly help.

 

Thanks ,

Leena Jain

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 1
Level 1
Ak_Agarwal
Level 1

Like

1 like

Total Posts

1 post

Correct reply

1 solution
Top badges earned
Boost 1
Affirm 1
View profile

Avatar
Boost 1
Level 1
Ak_Agarwal
Level 1

Like

1 like

Total Posts

1 post

Correct reply

1 solution
Top badges earned
Boost 1
Affirm 1
View profile
Ak_Agarwal
Level 1

11-06-2020

Dear @LeenaJaIN ,

 

As you mentioned you have already tested api response using fdm read service. So there can't be problem in rest API. But when you created an AuthID input parameter in adaptive form then some rules can be set by invoking the required service and setting up the correct output elements. This will prefill your adaptive form elements based on AuthId entered from rest API. Please go through this article as i found this helpful.

https://medium.com/adobetech/using-external-data-sources-in-aem-forms-with-openapi-swagger-specifica...

Thanks

Answers (3)

Answers (3)

Avatar

Avatar
Boost 1
Level 1
AkAgarwal
Level 1

Likes

2 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
AkAgarwal
Level 1

Likes

2 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
AkAgarwal
Level 1

11-06-2020

Dear Leena,

 

Please try setup your adaptive form input field AuthID's rules.

Thanks

Avatar

Avatar
Give Back
Level 1
LeenaJaIN
Level 1

Likes

2 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Give Back
Boost 1
View profile

Avatar
Give Back
Level 1
LeenaJaIN
Level 1

Likes

2 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Give Back
Boost 1
View profile
LeenaJaIN
Level 1

08-06-2020

HI Mayank,

 

following response from FDM:

 

{
    "id": "1234",
    "dob": "07/30/1978",
    "name": {
        "first": "yriur",
        "middle": "ckjhc",
        "last": "yeiuhr"
    },
    "accounts": [
        {
            "accountNumber": "1234",
            "primaryPhone": "35474894004",
            "mailingAddress": {
                "street": "310 ",
                "city": "WEAVERVILLE",
                "state": "NC",
                "zip": "28787"
            },
            "ownerType": {
                "type": "JOINT",
                "description": "JOINT "
            },
            "primaryEmail": "noemail@test.com",
            "owners": [
                {
                    "name": {
                        "first": "JAY",
                        "middle": "IAN",
                        "last": "FINE"
                    }
                }
            ]
        }
    ]
}

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

08-06-2020

@LeenaJaIN  please post the test response of FDM from fdm test UI.