How to add dynamic value to URL parameter

I have page ( data_table.php ) that has a table that displays basic info from a query built on numerous joins [ see attachment ]

Each row from this table uses a Dynamic Event to add a click action that uses the browser components Go To function to forward to another page ( detail_display.php ). [ see attachments ].

The detail_display.php page has a query that is filtered by a URL parameter so it displays the correct data.

So my question is how do I add the dynamic value to the URL parameter in the Go To Properties? The value being the ‘acc_id’ for each row of data shown in the data table.

Hope this makes sense.

Thanks in advance!

Hello,
I don’t think you need the browser component here.
Simply do the following for each link
<a class="btn btn-info" dmx-bind:href="detail_display.php?id={{acc_id}}">Your text</a>

Hi #t11. The problem is I need to bind the link to a table row ( tr ) not an anchor link. I was advised by #mebeingken to use the browser component to do this.

So I currently have:

<tr dmx-on:click="browser1.goto('detail_display.php')">
						<td dmx-text="date_of_app"></td>
						<td dmx-text="premises_name"></td>
						....
</tr>

Your saying I could do this?

<tr dmx-bind:href="detail_display.php?id={{acc_id}}" >
						<td dmx-text="date_of_app"></td>
						<td dmx-text="premises_name"></td>
						.....	
</tr>

Why not just select it from the data picker in the goto properties? Pick the value you want to bind from the repeat region and it will generate the right expression for you.

1 Like

Thanks #Teodor… I’ve got this working now. I was using the wrong parameter name. I was using acc_id from the $_GET variable ( see attachment ) … Instead of the Query Parameter accID. ( see attachment ).

I now have this which works fine!

'detail_display.php?accID='+acc_id ( see attachment )

Thanks for your help!

Screenshot 2020-08-20 at 15.51.34

1 Like