Thursday 26 July 2012

How to call a Linx Process and store a return value in variable

Stadium allows you to call a Linx process and with the latest release, it gets one step  better! The values returned by a Linx process can be used within Stadium.

Scenario : Set field property in DetailsView to ReadOnly based on value returned from Linx process

Set up a Linx process that returns Boolean value = True.

In Stadium Designer, set up a page with a Button and DetailsView.

In the button Click event, add a variable called linxvar.

Then, add CallLinxProcess action the ‘Click’ event of the button.
CallLinxProcess action has a ‘Parameters’ property. This property allows you to assign Input and output parameters. In this scenario, the Linx process contains one output parameter.

Set the parameter as follows:
  • Parameter Source :  None
  • Name : Boolean1 (Use the same name as Linx Output variable)
  • OutputToVariable : linxvar (name of the variable which was assigned in Click event)
  • Type : Boolean (Same type as Linx Output variable)

In this scenario, we are using the return variable to set a field in DetailsView to ReadOnly. To do that, add a SetControlProperties event after CallLinxProcess. Set the field ReadOnly value to linxvar variable.

You can now view the page in Internet Explorer. When you click on the Button, the Linx process will be called.

In Summary, you can call a Linx process; store the return value in a variable, then use the variable to set properties or as an input to other processes. However, take note of the following rules:
  1. The variable name defined in CallLinxProcess parameters property MUST be the same as the variable name in Linx.
  2. Linx allows Input and Output variable to have the same name but Stadium does not. So, if you want to link a Linx process in Stadium, ensure that the variable names are different.


  1. [...] CallLinxAction can now store return values in variables [...]

  2. [...] Store Linx return values in variables Share this:TwitterEmailPrintFacebookLike this:LikeBe the first to like this. [...]