December 16, 200619 yr Hi to all you there I have a little problem and i hope you can help me i have a script with a parameter but when i enter find mode inside the script that parameter simply disappears, is that normal??? Thanks
December 16, 200619 yr No, parameters sent to a script persist even in Find Mode. There must be something else going on.
December 16, 200619 yr Hi to all you there I have a little problem and i hope you can help me i have a script with a parameter but when i enter find mode inside the script that parameter simply disappears, is that normal??? Are you SURE that's what's happening? Have you tried opening up the data viewer while in your script and just using Get(ScriptParameter)?
December 19, 200619 yr Author i´ve cheked that and you are right the script parameter is there, but i am using a custom function called GetParam (paramName) like this Evaluate ( "Let ([" & Get(ScriptParameter) & "]; " & paramName & ")" ) in my script i have to look for some records in a layout from another table, and when i change to that layout the GetParam function returns nothing, but the Get (ScriptParameter) works. I hope you understand my explanation, and can help me, i cant find a solution for this. Thanks
December 19, 200619 yr It's hard to say what's wrong without seeing it. Maybe you haven't quoted the parameters correctly. Anyway, why don't post the script for us to look at.
December 19, 200619 yr It sounds like there's something wrong with the custom function.. but Ender's right, post the script (and double check the custom function code you used and that it's what you actually need). I'll often pass multiple parameters but then just parse them out into variables... e.g. GetValue(Substitute( Get(ScriptParameter) ; "|" ; "¶" ) ; 3) Will retrieve "Likes" in the parameter list "John|Mayer|Likes|Fish" You can just as easily make the above a CF as well and just call it getparam2( paramNum ) where paramNum in this case would be 3 Edited December 19, 200619 yr by Guest
December 21, 200619 yr Author Hi all!! This is my script parameter: "idTrabajador = Trabajadores::idTrabajador; TipoMov = Trabajadores::TipoMov; fechaMov = Trabajadores::FechaMov; idObra = Trabajadores::idObra; salario = Trabajadores::Salario; TipoTrabajador = Trabajadores::TipoTrabajador; causaBaja = Trabajadores::CausaBaja" My script: 1.- Set Variable [$idT; Value:GetParam("idTrabajador")] 2.- Go To Layout ["MovimientosLista"(Movimientos)] 3.- Enter Find Mode [] 4.- SetField [Movimientos::idTrabajador;$idT] 5.- Perform Find [] Using script debug: In Line 1 everything is working fine, i get the data i expect; In line 2 all data i get is wrong, and that layout has data form a diferent table, so maybe here is the problem; in Line 3 i don´t get any data, but get (ScriptParameter) is ok; There must be something i´m doing wrong but i don´t know what is it. Thanks, again Edited December 21, 200619 yr by Guest
December 21, 200619 yr I think the problem is with your parameter's syntax. The values must be evaluated in the parameter, like this: "idTrabajador = " & Trabajadores::idTrabajador & "; TipoMov = " & Trabajadores::TipoMov & "; fechaMov = " & Trabajadores::FechaMov & "; idObra = " & Trabajadores::idObra & "; salario = " & Trabajadores::Salario & "; TipoTrabajador = " & Trabajadores::TipoTrabaja dor & "; causaBaja = " & Trabajadores::CausaBaja Also, if any of those are text, you'll need to add quotes around their values, like this: "param = "" & table::field & """
December 26, 200619 yr Author Thank you Ender you are totally right i fixed it and it works perfect. Thanks to all who made a reply to this thread
Create an account or sign in to comment