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

SOLVED

Web application and loading content dynamically

d-wnuk
Level 2
Level 2

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

1 Accepted Solution
d-wnuk
Correct answer by
Level 2
Level 2

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

View solution in original post

1 Reply
d-wnuk
Correct answer by
Level 2
Level 2

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

View solution in original post