Community / Content » My · Videos · Forums · Wiki ·

Token: Action / Actions

 

Setting session variable values to specific column values and immediately transporting to the Tab/Page associated with consuming those values is made simple with out Action syntax. All runtime actions like Sorting, Interactive Lists and Actions utilize the similar formatting structures contained within curly braces {...}. Actions require four parameters. The first is simply the type of interaction performed, in this case ACTION. The second parameters, the name of the column (inside or out of square brackets) passed to the session variable. Third, the name of the Session Variable where the Column Value will be stored. And finally, the link or TabId which the Action will be directed towards. The block for action will render a formulated HREF tag which is required for Anchor tag elements. The action tag will execute a javascript function built in to ListX, so the ACTION element should always occur within an ANCHOR tag. Follow the syntax definitions provided to assist in building the appropriate output block.
Tip: Actions do not always need to leave the current page when clicked. Sometimes you will simply be drilling deeper into a query, or changing the information provided on other modules in the same page. Leaving the Link blank or setting it to the current tab will easily provide this behavior.
Action Syntax:
{ACTION,ColumnValue,SessionVariableName,Link,Optional Variable Type,Option render HREF }
You may also use the ACTIONS syntax to execute multiple variable assignments at once.
{ACTIONS,ColumnValue1,SessionVariableName1,Variable Type1,ColumnValue2,SessionVariableName2,Variable Type2...,Optional Link}
Example
<a {ACTION,[EventLogId],CurrentEventLogId,62}/>...<a/> 
Additionally, you could send Module Communication Messages through the same Action tags - the following sample broadcasts a Message with a Type of "DeleteItem" and a value appearing in the EventLogId column:
<a {ACTION,[EventLogId],DeleteItem,,Message}/>...<a/> 
Suppose you had a listing with a column that was an edit button. You need the button to assign the primary key value from the row to a session variable. What if your primary key were a composite key, as is the case with ModuleSettings? Use the ACTIONS tag:
<a {ACTIONS,[ModuleID],SettingModuleID,Session,[SettingName],SettingSettingName,Session,85}/>...<a/> 
Interaction Type
All interaction elements for ListX utilize similar formatting to keep things uniform. Action Items are always contained within curly braces {...} with the first parameter identifying the type of interaction. In the case of this element, ACTION will be the first parameter. Other types of actions include SORT,SORTHEADER, and other types including CHECKLIST.
Column Name
The value from the column column which will be placed in the Session Variable assigned as the next parameter. The variable may be a single column name, or could utilize the Column Value syntax to build combined - or formatted values. (See Column Values)
Variable Name
The core of interactive elements on the web is provided by utilizing some type of shared variable which can be assigned or read from different modules within your overall system. ListX is capable of reading and writing to variable located in the Session, QueryString, Cookie and ViewState. Place the name of the variable which will store the value of the column chosen in this interactive element.
Link
Finally, once you have specified which variable you will utilize in your action, and where that variable should be stored, you must provide a link which will be followed upon completion of the variable assignment. This value is normally the Id of a Tab, or could be the tab name, URL, or value from a module setting. In the case of the ACTIONS tag, the Link is optional, but you MUST have the , in place anyway.
Optional Variable Type
ListX is capable of reading and writing to variable located in the Session, QueryString, Cookie and ViewState. The default value to which ListX binds is Session, but it is simple to bind to any of the other types, just provide the name of the type in this position.
Optional Render HREF
ListX generates the standard href=”javascript:__doPostBack” logic, so, if you want to use an action tag within an onclick, or a physical javascript tag – set the last parameter to False, as True is the default.  When false, just the __doPostBack section will be generated.

 

Setting session variable values to specific column values and immediately transporting to the Tab/Page associated with consuming those values is made simple with out Action syntax. All runtime actions like Sorting, Interactive Lists and Actions utilize the similar formatting structures contained within curly braces {...}. Actions require four parameters. The first is simply the type of interaction performed, in this case ACTION. The second parameters, the name of the column (inside or out of square brackets) passed to the session variable. Third, the name of the Session Variable where the Column Value will be stored. And finally, the link or TabId which the Action will be directed towards. The block for action will render a formulated HREF tag which is required for Anchor tag elements. The action tag will execute a javascript function built in to ListX, so the ACTION element should always occur within an ANCHOR tag. Follow the syntax definitions provided to assist in building the appropriate output block.

 

Action Syntax:

{ACTION,ColumnValue,SessionVariableName,Link,Optional Variable Type,Option render HREF }

 

You may also use the ACTIONS syntax to execute multiple variable assignments at once.

{ACTIONS,ColumnValue1,SessionVariableName1,Variable Type1,ColumnValue2,SessionVariableName2,Variable Type2...,Optional Link}

 

Example

 

<a {ACTION,[EventLogId],CurrentEventLogId,62}/>...<a/> 

 

Additionally, you could send Module Communication Messages through the same Action tags - the following sample broadcasts a Message with a Type of "DeleteItem" and a value appearing in the EventLogId column:

 

<a {ACTION,[EventLogId],DeleteItem,,Message}/>...<a/> 

 

Suppose you had a listing with a column that was an edit button. You need the button to assign the primary key value from the row to a session variable. What if your primary key were a composite key, as is the case with ModuleSettings? Use the ACTIONS tag:

 

<a {ACTIONS,[ModuleID],SettingModuleID,Session,[SettingName],SettingSettingName,Session,85}/>...<a/> 

 

 

Interaction Type

All interaction elements for ListX utilize similar formatting to keep things uniform. Action Items are always contained within curly braces {...} with the first parameter identifying the type of interaction. In the case of this element, ACTION will be the first parameter. Other types of actions include SORT,SORTHEADER, and other types including CHECKLIST.

 

Column Name

The value from the column column which will be placed in the Session Variable assigned as the next parameter. The variable may be a single column name, or could utilize the Column Value syntax to build combined - or formatted values. (See Column Values)

 

Variable Name

The core of interactive elements on the web is provided by utilizing some type of shared variable which can be assigned or read from different modules within your overall system. ListX is capable of reading and writing to variable located in the Session, QueryString, Cookie and ViewState. Place the name of the variable which will store the value of the column chosen in this interactive element.

 

Link

Finally, once you have specified which variable you will utilize in your action, and where that variable should be stored, you must provide a link which will be followed upon completion of the variable assignment. This value is normally the Id of a Tab, or could be the tab name, URL, or value from a module setting. In the case of the ACTIONS tag, the Link is optional, but you MUST have the , in place anyway.

 

Optional Variable Type

OWS is capable of reading and writing to variable located in the Session, QueryString, Cookie and ViewState. The default value to which ListX binds is Session, but it is simple to bind to any of the other types, just provide the name of the type in this position.

 

Optional Render HREF

OWS generates the standard href=”javascript:__doPostBack” logic, so, if you want to use an action tag within an onclick, or a physical javascript tag – set the last parameter to False, as True is the default.  When false, just the __doPostBack section will be generated.

 

 

 

Average ( Ratings):