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

Web application and loading content dynamically

Avatar

Avatar
Validate 1
Level 2
d-wnuk
Level 2

Likes

3 likes

Total Posts

16 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
d-wnuk
Level 2

Likes

3 likes

Total Posts

16 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
d-wnuk
Level 2

31-01-2019

Hi,

I have built microsite which is supposed to generate a calendar invite file (*.ics) given an event id as a parameter. Web app is build with two elements - the first one is javascript block which looks like this:

var eventID = ctx.vars.eventID;

var myQuery = xtk.queryDef.create(

     <queryDef schema="xyz:eventSchema" operation="get">

          <select>

               <node expr="@event_id"/>

               <node expr="@event_name"/>

               ...

          </select>

          <where>

               <condition expr={"@event_id= '" + eventID + "'"} />

          </where>

     </queryDef>);

var res = myQuery.ExecuteQuery();

ctx.eventDetails = <eventDetails/>;

ctx.eventDetails = <eventDetails event_id={res.@event_id} ...}/>;

And then, there is a page block where I have another script to generate *.ics file and html code but I have an issue with displaying values. The above solution seems to works as expected for default id (id=0) - I'm able to access all values for this default id, however when I'm changing id to another one, the site refreshes but the content stays the same as for default value, e.g.:

microsite.adobe-campaign.com/webapp/app&id=0 => event_id = 1, event_name = 'default event name'

microsite.adobe-campaign.com/webapp/app&id=12345 => event_id = 1, event_name = 'default event name' (values do not change)

I assume that at some point values from query may be stored in const instead of variable but I have no clue how (or where) it can be change.

Any help would be greatly appreciated.

Dominik

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 2
d-wnuk
Level 2

Likes

3 likes

Total Posts

16 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
d-wnuk
Level 2

Likes

3 likes

Total Posts

16 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
d-wnuk
Level 2

11-02-2019

In meantime I found the solution and it was trivial. I wrongly assumed that my parameter event_id is automatically matched with 'id' in the microsite link. The solution works as expected using the following link:

microsite.adobe-campaign.com/webapp/app&id=0&event_id=12345

Answers (0)