Server Connect Dynamic url

Im trying to figure out how to use server connect with a dynamic url attribute. Currently my code looks like this:

<dmx-serverconnect id="classAPI" dmx-bind:url="'api/'+selectedterm+'/'+gradMode" noload="true"></dmx-serverconnect>

Wappler_DPelUs4sJz

But when loaded in the browser, the server connect url is this:
localhost:3000/api/[object%20Object]/[object%20Object]

Both “selectedterm” and “gradMode” variables are regular string/text and have values. Anyone know what I’m doing wrong here?!

It is the correct way of doing it, but seems your selectedterm and gradMode values are causing the issue.
What are these dynamic values? Where do they come from?

Use

selectedTerm.value
GradMode.value

If they’re variables

2 Likes

Ah you’re right, I wrote it manually instead of using the ui to get the formatting down properly and I completely forgot .value :stuck_out_tongue:

1 Like