December 4, 200718 yr 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...
December 4, 200718 yr Try this instead: Let( [ $$CreationDate = Get(LayoutTableName) & "::Creation Date"; $$CreationName = Get(LayoutTableName) & "::Created By" ]; "" )
December 4, 200718 yr Author Ha! It swallowed it - I thought those braces are optional, but apparently only the curved ones { } Thank you!!
December 4, 200718 yr 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" ] ; "" )
December 4, 200718 yr Square brackets are only required if you're defining more than one variable within the Let () function.
December 4, 200718 yr 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 December 4, 200718 yr by Guest
December 4, 200718 yr 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 December 4, 200718 yr by Guest
December 4, 200718 yr 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/
December 4, 200718 yr 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 December 4, 200718 yr by Guest
Create an account or sign in to comment