Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

How to retrieve and populate data from external services-AEM 6.4

Avatar

Former Community Member

Hi Experts,

we have one drop-down metadata field "Dealer ID". When user will select any value from this drop down then we want to call some external REST service and want to retrieve the some data and populate in to another metadata fields like (dealer name, dealer location etc. ) in same metadata schema.

For example in below screen Dealer Name and location will be populate based on dealer ID via external REST API

1569864_pastedImage_0.png

Can you please help us and suggest the approach like how it is possible in AEM 6.4.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi Sameer,

You can do it that as well for schema but I have never seen this kind of use case before so it is hard to find example but you can write javascript to make ajax call on selection of one dropdown and update another.



Arun Patidar

View solution in original post

5 Replies

Avatar

Community Advisor

you need to write JS event on select and populate fields into another dropdown, you can do it with DOM manupulation or they with datasource if works but not sure.

Example

Adobe Experience Manager Help | Dynamically updating Adobe Experience Manager TouchUI Dialog Select ...

AEM 6.0 Forms Help | Dynamically populating drop-down lists



Arun Patidar

Avatar

Former Community Member

Hi Arun

Actually we want to do it on metadata schema editor not on dialog and forms.

Any example or sample for metadata schema?

Thanks

Avatar

Level 10

Most third party integration done at component level (displayed in a component that is then visible in a web site) or dialog level. I have never seen an example for metadata schema.

Avatar

Correct answer by
Community Advisor

Hi Sameer,

You can do it that as well for schema but I have never seen this kind of use case before so it is hard to find example but you can write javascript to make ajax call on selection of one dropdown and update another.



Arun Patidar

Avatar

Level 10

Arun is correct - this can be done - but this is a very uncommon use case - so you will not find examples in the Adobe docs and articles.