Expand my Community achievements bar.

SOLVED

Load input form with Data from a query or method

Avatar

Level 7

Hello, is it possible to load an input form input with data of a method?

I call a method pressing a button, then I want that the info returned by that method is showed in the input form. Is it possible?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @CampaignerForLife,

 

Yes it's possible.

Here is an exemple.

i've created bellow schema with the below method :

Amine_Abedour_0-1703869863618.png

The definition of the method is simple, it just returns a string : 

Amine_Abedour_1-1703869912585.png

In a form, i trriger the method using a button and store the result of the method in my @string field.

I use a <refresh/> so that the result can be seen on the screen and a <saveView/> so that the change get stored to database

Bellow the definition of my form :

 

Amine_Abedour_2-1703869996793.png

 

Before clicking the button:

Amine_Abedour_3-1703870516741.png

After clicking the button:

Amine_Abedour_4-1703870562252.png

 

Br,

Amine ABEDOUR

 

View solution in original post

2 Replies

Avatar

Community Advisor

Hello @CampaignerForLife,

Do you mean to load input in adobe campaign console or in web application?

In campaign console
In campaign console you can do radio button but that enumeration is defined in the schema.

https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/input-fo...

You can change the schema programatically but wont recommend. 
You can try to use enumaration field instead


On web app
On web app you can do it as well

Marcel

Avatar

Correct answer by
Community Advisor

Hello @CampaignerForLife,

 

Yes it's possible.

Here is an exemple.

i've created bellow schema with the below method :

Amine_Abedour_0-1703869863618.png

The definition of the method is simple, it just returns a string : 

Amine_Abedour_1-1703869912585.png

In a form, i trriger the method using a button and store the result of the method in my @string field.

I use a <refresh/> so that the result can be seen on the screen and a <saveView/> so that the change get stored to database

Bellow the definition of my form :

 

Amine_Abedour_2-1703869996793.png

 

Before clicking the button:

Amine_Abedour_3-1703870516741.png

After clicking the button:

Amine_Abedour_4-1703870562252.png

 

Br,

Amine ABEDOUR