Call a function with an argument inside registry field

Started by velasquez · 2015-01-12 22:08 UTC · 4 replies · SMF topic #2226

author=owenwengerd link=action=profile;u=4 date=1420830270 wrote:
[quote author=velasquez link=action=profile;u=17 date=1420824060]
I need to call a function with an argument inside field registry.


Your syntax is incorrect. It should be:
ValueData: {code:myfunction|myargument};

However, your function only appends the argument, so there is no need for it:
ValueData: {code:myfunction}myargument;

Better:
ValueData: {app}\MAyapp r4.0\myargument;

Please post future questions in the forum so that everyone can benefit from the discussion.


Hello Owen,
His answer was helpful with the function call.
What I need to pass to the function a variable I created in another point of my script.
ex:

Ex: myvariable1: = test_a.vlx
      myvariable2:  = test_b.vlx
      myvariable3:  = test_c.vlx

ValueData: {code:myfunction|myvariable..};

I'm not getting it.
Thanks
If the value is in a global variable, your function can refer directly to the global variable and ignore the argument.
author=owenwengerd link=topic=2226.msg11183#msg11183 date=1421104165 wrote:
If the value is in a global variable, your function can refer directly to the global variable and ignore the argument.


This I do not understand Owen.
You mean I need a function for each variable?
ValueData: {code:myFunction};

var myVariable1: String;

//set myVariable1 as required

procedure myFunction();
begin
  //do something with myVariable1
end;
author=owenwengerd link=topic=2226.msg11185#msg11185 date=1421166579 wrote:
ValueData: {code:myFunction};

var myVariable1: String;

//set myVariable1 as required

procedure myFunction();
begin
  //do something with myVariable1
end;



Ok Owen,
thank you