Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to set environmental variables and call it from adaptive form?

Avatar

Avatar
Validate 1
Level 1
mohamedn4455443
Level 1

Likes

0 likes

Total Posts

46 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back 3
Give Back
Affirm 1
View profile

Avatar
Validate 1
Level 1
mohamedn4455443
Level 1

Likes

0 likes

Total Posts

46 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back 3
Give Back
Affirm 1
View profile
mohamedn4455443
Level 1

25-08-2020

How to set environmental variables?

Such as webservice url variable in development and production.

View Entire Topic

Avatar

Avatar
Ignite 1
Level 4
Andrei_Dantsou
Level 4

Likes

35 likes

Total Posts

29 posts

Correct Reply

14 solutions
Top badges earned
Ignite 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Ignite 1
Level 4
Andrei_Dantsou
Level 4

Likes

35 likes

Total Posts

29 posts

Correct Reply

14 solutions
Top badges earned
Ignite 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Andrei_Dantsou
Level 4

25-08-2020

Hello @mohamedn4455443 ,

If your goal is to use the values in your code you can use environment specific OSGI configurations https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/deploying/overv...

If you need to set up the url for referencing your site at different environments, it should be done at Dispatcher level https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/configuring/dispatcher-do...

Alternatively, you can expose the necessary property at the page component level and set it up in the Page Properties of the root page at the specific environment.

The approaches may vary depending on your use cases.

Regards

 

 

if the Run Modes were set up accordingly at your environments, e.g. development, production, etc. (https://docs.adobe.com/content/help/en/experience-manager-64/deploying/configuring/configure-runmode...), you can get the current Run Mode at backend and it will contain the corresponding value, such as development or production. The example of getting the Run Modes in Java code https://sling.apache.org/documentation/bundles/sling-settings-org-apache-sling-settings.html
The example of getting Run Modes in Sightly https://gist.github.com/gabrielwalt/278f8cee870aac7ec619

See: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-forms/getting-current-aem-...