DisplayWithVariables
No edit summary
(Automatically adding template at the end of the page.)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
DisplayWithVariables is a special verb that will inject variabel values on navigation.
This article describes how to inject or set variable values from URL parameters.
 
DisplayWithVariables is a special verb that will inject variable values on navigation.  
  http://<Host>/Turnkey/DisplayWithVariables?view=<ViewName>&id=<RootId>&vNewVar1=value1&vNewVar2=value2
  http://<Host>/Turnkey/DisplayWithVariables?view=<ViewName>&id=<RootId>&vNewVar1=value1&vNewVar2=value2
The url above will try and find vNewVar1 variable of type string in <ViewName> - if found assign the value1 to this variable.
The URL above will try to find the vNewVar1 variable of type string in <ViewName> - if found, assign the value1 to this variable.


The same will happen for vNewVar2.
The same will happen for vNewVar2.


=== Improvement deployed 20190622 DWV ===
Note! Both '''view''' and '''id''' are '''required'''. See below for how to avoid having to send the '''id'''.
 
==== Improvement Deployed 2019-06-22 DWV ====
DisplayWithVariables has been given a shortcut verb. You can now also use this form:
DisplayWithVariables has been given a shortcut verb. You can now also use this form:
  http://<Host>/DWV?v=<ViewName>&i=<RootId>&vNewVar1=value1
  http://<Host>/DWV?v=<ViewName>&i=<RootId>&vNewVar1=value1
The Id of the root object is sent in with "i", If "i" is omitted null is assumed
The Id of the root object is sent in with "'''i'''." If "'''i'''" is omitted, null is assumed
 
==== Improvement Deployed 2020-08-08 ====
These functions now set the ViewModel variable '''RawURL''' to the requested URL, including parameters. This makes special processing available to the modeled code.
 
==== Improvement Deployed 2020-11-25 ====
Sometimes, when we need a callback URL, the DWV is practical. However, some services cannot handle callbacks with parameters (Docusign Authentication)! So the DWV has now been extended so that all these URLs will do the same thing:
https://<server>/Turnkey/AngularApp#/SomeView/2!28  Original
https://<server>/DWV?v=SomeView&i=2!28              How it was - and still is
https://<server>/DWV/SomeView/2!28                  New! DWV/view/id
 
Also, see The_ExternalId_explained to get other more time-resilient forms of objects' ids as <classid>!GP!<guid>
[[Category:MDriven Turnkey]]
{{Edited|July|12|2024}}

Latest revision as of 15:33, 10 February 2024

This article describes how to inject or set variable values from URL parameters.

DisplayWithVariables is a special verb that will inject variable values on navigation.

http://<Host>/Turnkey/DisplayWithVariables?view=<ViewName>&id=<RootId>&vNewVar1=value1&vNewVar2=value2

The URL above will try to find the vNewVar1 variable of type string in <ViewName> - if found, assign the value1 to this variable.

The same will happen for vNewVar2.

Note! Both view and id are required. See below for how to avoid having to send the id.

Improvement Deployed 2019-06-22 DWV

DisplayWithVariables has been given a shortcut verb. You can now also use this form:

http://<Host>/DWV?v=<ViewName>&i=<RootId>&vNewVar1=value1

The Id of the root object is sent in with "i." If "i" is omitted, null is assumed

Improvement Deployed 2020-08-08

These functions now set the ViewModel variable RawURL to the requested URL, including parameters. This makes special processing available to the modeled code.

Improvement Deployed 2020-11-25

Sometimes, when we need a callback URL, the DWV is practical. However, some services cannot handle callbacks with parameters (Docusign Authentication)! So the DWV has now been extended so that all these URLs will do the same thing:

https://<server>/Turnkey/AngularApp#/SomeView/2!28   Original
https://<server>/DWV?v=SomeView&i=2!28               How it was - and still is
https://<server>/DWV/SomeView/2!28                   New! DWV/view/id

Also, see The_ExternalId_explained to get other more time-resilient forms of objects' ids as <classid>!GP!<guid>

This page was edited 91 days ago on 02/10/2024. What links here