Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script Parameters

Featured Replies

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

No, parameters sent to a script persist even in Find Mode. There must be something else going on.

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)?

  • 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

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.

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 by Guest

  • 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 by Guest

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 & """

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.