Menu

Action Form Notes

Action Form is a module developed by PlantAnApp for the DNN Content Management System and Development Platform. The developers at LetItShine.biz have used the Action Form module for countless projects and solutions for a number of years. The following is an modest collection of notes that we have started to record about techniques to take advantage of the strengths of this module. We record this here not to become a secondary help system for Action Form users or DNNSharp. But if you can find something here that helps you, that makes us happy too.

Return to the list

QueryString parameters with Default Values

Mark Buelsing 0 2881 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"

RSS