XModPro

Parameter in ControlDataSource does not work with [[Form:..] Token

Roel Broersma Roel Broersma posted Jan 10, 2020
Active Jan 10 · Viewed 1977 times

Hello,

I am doing a test and found the following;


I have a template on which is an edit button.

When clicking the EDIT button, it displays the EDIT form. The Edit form has a <SelectCommand> with a <parameter value='[[Form:product_id]]' and that works! (I have multiple template/forms with this technique)

However, when I add a <ControlDataSource> with the same parameter, it doesn't work. Althought when I set the parameter to a static value='1' it works. It also works when testing with a Url parameter value='[[Url:blabla]]' But not with a Form (Post) parameter.


Example: (below is NOT working!!)

<ControlDataSource id="dsProducts" CommandText="SELECT @product_id AS product_id, 1 AS product_name" ConnectionString="xxxxxxxxxxxxx" >
<parameter name="product_id" Value='[[Form:product_id]]' datatype="String" defaultvalue="" />
</ControlDataSource>



Is this a known issue?


Kind regards,


Roel Broersma

0 Replies

Loading replies...