Menu

Solutions to Problems or Custom Needs in a Website

Many solutions we create for one site can be used and appreciated on other sites also.

Have a look at this list of components and solutions we have developed over time and if you could benefit from any of them you are welcome to them.

Please let us know if you would like to discuss the details or would like some help getting one installed.

Standard Tokens in Action Form

Mark Buelsing 0 7312 Article rating: No rating
  • Utility Tokens
    • [_ReportKey] - unique ID that identifies the current submission. This also powers edit functionality in Action Form. Whenever a entry parameter is present in query string, Action Form tries to match the associated report entry and load it into the form.
    • [_Referrer] - holds the URL from which the user arrived to the form
    • [_UserIp] - holds the IP of the user
    • [_FormUrl] - the URL where the form lives
    • [_FormUrlRelative] - same as above, only it’s a relative URL
    • [_EditUrl] - is the URL to edit current submission at a later time
    • [_IsNew] - true when the form is submitted for the first time
    • [_IsEdit]- true when the form is edited (for example using the [_EditUrl] token or Action Grid).
  • These tokens also work
    • [Module:ModuleId] - The Module ID

QueryString for Action Form

[GET:SomeParam=21]

[QueryString:SomeParam]

[QueryString:SomeParam=ValueifParamEmpty]

QueryString for Action Grid

[$ID=1]   (This syntax only works for ActionGrid)

Also alternative syntax for Querystring tokens: [
QueryString:PID=-1] 
introduced for Action Grid, the -1 is needed to allow QctionGrid to return the columnnames first

  • Read More to see more tokens

QueryString parameters with Default Values

Mark Buelsing 0 2425 Article rating: No rating

 

You can use [$id] instead of [QueryString:id], for example in a grid’s data source you can set as statement:

select * from Users where UserID=[$ID=1] 

If I access a page with no id in query string, then the -1 id will be taken as default and no value will be returned because there is no user with -1 id.

* I have seen it written that MyTokens was necessary in order to use this notation, however it worked for me without MyTokens.

___

The following might work only when MyTokens is installed

Default values are supplied when the token is invoked, this method works for any token and it will override the default value that is specified for custom tokens when they are defined.

The syntax is: [MyNamespace:MyToken = My text value that is displayed if there is data returned by the token]

For example, [GET:SomeParam=21] will return 21 if a parameter with name SomeParam doesn’t exist in Query String.

If you want to hide something if the querystring parameter does not exist, then it looks like this:  [QueryString:WEID=0]!="0"

Send more columns of data through the Multiple Choice Dropdown

Action Form. Pack more data into your Multiple Choice Dropdown, unpack it when an option is chosen

Mark Buelsing 0 3996 Article rating: No rating

The multiple choice field has the value and the label. That's two columns of data on each row. When you really need more than two columns for each row, you can have it with some creative SQL and Javascript.

RSS
1234567
RSS
1234