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.

passing variables using the list function

Featured Replies

Hello all;

i love the idea of using filemaker the way Matt does. makes sense to me, however the logic is very difficult compared to what i already knew in other languages.

If passing parameters using list. what r the rules or best practices for this.

e.g.

when user clicks on my button

1-> create a list first:: Button --> list ( "object =" & $object ; "row =" & $row;)

2-> main script:: Create a $var = (customfunction:: ( get (scriptparameter))

3-> if the $var was created, then do other logic

Also , can we get more "EXPLANATION" of the Let Function & Evaluate function as Matt uses these extensively & i love the use, it is just hard to wrap my head around the logic currently.

thanks everyone.

-imoree

I don't see anything wrong with your parameter passing steps, although I don't know that List gives you any particular advantage since even without it, you're still passing name-value pairs, which gives you all you need.

I generally do this:

1. Pass params: e.g., "id=" & IDfield & ";name=" & nameField & etc.

2. In script, set variable $param to Get( ScriptParameter )

3. Set each variable: $id = GetNamed( $param ; "id" )

The GetNamed function is one I got from SeedCode years ago (I was given the OK to post it):

Let ( [

  string = Substitute ( Text ; [ """ ; "^^" ] ; [ " ;" ; ";" ] ; [ ";" ; "" ;" ] ;

								[ "= " ; "=" ] ; ["=" ; " = "" ] ; [PP ; "~~" ] ) & """ ;

  eval = Evaluate ( "Let ( [" &  string  & "] ;" & Name & " )" ) ;

  result = Substitute (  eval ; [ "^^" ; """ ] ; [ "~~" ; PP ]  )

  ] ;  // where you see PP, replace with paragraph symbol, BBcode is messing it up



  If ( result ="?" ; "" ; result )

)

I'm going to punt on explaining Let and Evaluate -- do you have a specific question?

Meanwhile, you should read this, and the discussion that follows (see Edit: the original discussion is gone):

http://www.geistinte...iple-parameters

(Is Petrowsky the Matt you're talking about?)

Edited by Fitch
sadly, the wonderful comments on Todd's post were lost when he changed his blog format.

  • Author

Yes , Petrowsky is the Matt i am talking about.

thanks for the info,.

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.