This topic is locked
[SOLVED]

 Dynamic parameter setting from a field

11/29/2018 8:13:30 AM
ASPRunner.NET General questions
Dalkeith author

I have a field displayed in a list in a table that contains web address - I have a button within the record
How do I make it dynamically pickup the url of the record?
I know this will be written somewhere but have been unable to find it. Thanks

T
Tim 11/29/2018

I think what you want is getCurrentRecord(). On the server portion of the button do this:
-----

XVar data = button.getCurrentRecord();

result["record"] = data;
result["url"]=data["NameOfYourURLField"].ToString();

----
Now on the client portion of the button:
----

location.href=result["url"].ToString();

----
I haven't tested this but I think it'll work.

Good luck!

Tim

Dalkeith author 11/29/2018

Thank you I thought it might be something like that.