Add Modules from datastore

I have a scenario that creates an HTML page as an output. The HTML page contains a menu and the links in this menu are dynamically populated by URL parameters passed to the webhook.
The links are populated like this
https://mydomain.com/?id={{5.id}}&pageval={{5.pg}}
where Module id 5 is the webhook that receives the parameters.
the output of the above will be something like https://mydomain.com/?id=2&pageval=17

This works absolutely perfectly.

However, we now want to change which links are displayed based on certain criteria ie different users will have a different menu.

My idea was to put the menu data into a datastore and filter the data based on URL parameter data (this works). I then use an aggregator to take collate the links into a single menu that is added to the HTML page. I thought i had it nailed except for one (crucial) thing. When the aggregator takes the URL info from the datastore it doesn’t recognise {{5.id}} as "module 5, field ‘id’ " it simply adds the text to the URL so the output is https://mydomain.com/?id={{5.id}}&pageval={{5.pg}}

My question is how do i get it to recognise that i want to use the actual value of {{5.id}} and not
the text “{{5.id}}”

Does that make sense?

Hi. Are you adding the step call in the datastore {{5.id}}? Can you send a printscreen?

“Don’t hesitate to contact us if you require further assistance.”

Cheers
//HFBR

Remember that you cannot add any module reference from a datastore record. Datastore can only save data objects not references from othe modules or steps.

“Don’t hesitate to contact us if you require further assistance.”

Cheers
//HFBR

1 Like

I think i have solved it by restructuring the URL and then adding the module ie {{5.id}} into the aggregator.

I’m interested in your response though - what did you mean by “a step call”

2 Likes

Great. I mean the code “{{5.id}}” directly in datastore field.

Cheers
//HFBR
Please don’t hesitate to contact us if you need any additional help.

1 Like