Setting value of session variable on screen preparation

Setting value of session variable on screen preparation


I'm struggling a little using the expression editor to do stuff in the Agile Platform at the mo and would appreciate a heads up on the above.

I'm just playing with passing data between web screens, actions etc and have configured a text session variable to pass a value from an Action to an expression widget on a webscreen. I would like to set the value of the session variable to nothing (to clear the value of the widget) on screen preparation. I have added an assign in the Action, pointed it to the session variable but can't work out the syntax I need in the Expression Editor to set the value of the widget.

Any help appreciated.



hi Simon,

dont know if i figured out well your question but let me try to help you.

if you just want to clear the session var, you just need to do the assign with an empty text like "", see the image bellow.

is this? hope so, and let us know about it.

Hi Simon,

Hey, there's no need to struggle - we're here to do our best to help!

In this case, if I'm understading your requirements correctly, I'd suggest using an assign node and in the variable select the Session variable (it should be something like Session.YourVariableName) and in the Value it should be "" (two " ), which indicates an empty string .

Any text you want to assign to a variable should be enclosed in " . For instance, "This message is correct" is a valid assign expression, and the value that is assigned is

This message is correct

Let us know if this answers your questions, and what other problems you bump into!


Paulo Tavares

Thanks for the posts - sorry I couldn't spot that given that it's frighteningly easy :)


Is there a built in function like inStr() in the Agile Platform?



I believe the "Index" function is what you're looking for ;)
Index(text, search)
If it can't find what you're searching for, it returns -1, otherwise it returns the position in the string where the search term starts.


Paulo Tavares
There is one built in similar to that one, that retruns the zero-based posistion in a String where the search can be found. Like Index( "First string", "F" ) = 0.

for more details check

Miguel Antunes

EDIT: double post, Paulo was faster :)