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.

Let Function "too many parameters"

Featured Replies

Hi guys,

I'm trying to create the simple "let" function to use it in a web-viewer on my layout - any ideas, why it refuses to work?

Let(

$$CreationDate = Get(LayoutTableName) & "::Creation Date";

$$CreationName = Get(LayoutTableName) & "::Created By"[color:red];

""

)

It keeps telling me there are too many parameters in the function. I'm sure I will feel very silly...

Try this instead:

Let(

[

$$CreationDate = Get(LayoutTableName) & "::Creation Date";

$$CreationName = Get(LayoutTableName) & "::Created By"

];

""

)

  • Author

Ha! It swallowed it - I thought those braces are optional, but apparently only the curved ones { }

Thank you!!

You don't need to define $variables or $$variables in a Let() function. In fact, you shouldn't - unless you have a good reason. This will work just as well:

Let( [

creationDate = Get(LayoutTableName) & "::Creation Date";

creationName = Get(LayoutTableName) & "::Created By"

] ;

""

)

Square brackets are only required if you're defining more than one variable within the Let () function.

  • Author

You don't need to define $variables or $$variables in a Let() function. In fact, you shouldn't - unless you have a good reason.

I think I do...

I'm putting it into a a web-viewer, at the bottom of my list layout I have a calculation field which contains those variables. Upon clicking on a record, it updates the information. Or in other words, the footer displays record info of the active record.

Edited by Guest

  • Author

In fact - this is pretty cool - you can use that technique to highlight records in list-view WITHOUT ANY SCRIPT.

Web Viewer:

Let(

$$RecordHilite = Get(RecordNumber)

""

)

Transparent button over Body part with conditional formatting:

Get(RecordNumber) = $$RecordHilite

If you have the web-viewer cover the entire layout, it forces a refresh of the formatting.

Edited by Guest

Yes, for this one you do need a variable - although a local one should do. See also:

http://www.fmforums.com/forum/showtopic.php?tid/188674/

  • Author

Oh wow... didn't realize there was a lengthy discussion about highlighting records on the site. Great thread!

And I see your point, and unstored calculation will do the same. I don't need the webviewer for this (record info). Duh!

Edited by Guest

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.