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.

Help required with Let function

Featured Replies

I am trying to re-format a timestamp in order to put it into a larger calculation (to compile a file path using variables) and FP is prompting me that there are too many parameters. Have I missed something or am I not able to use the Case function within the Let function? Here is my calculation;

Let (

[

$year = GetAsText ( Year ( Get ( CurrentTimeStamp ) ) );

$month = Case(

Length (Month ( Get ( CurrentTimeStamp )) = 1;

"0" & GetAsText (Month ( Get ( CurrentTimeStamp )));

GetAsText (Month ( Get ( CurrentTimeStamp ) ))

);

$day = Case(

Length (Day ( Get ( CurrentTimeStamp ) )) = 1;

"0" & GetAsText (Day ( Get ( CurrentTimeStamp ) ));

GetAsText (Day ( Get ( CurrentTimeStamp ) ))

)

$hour = Case(

Length (Hour ( Get ( CurrentTimeStamp ))) = 1;

"0" & GetAsText (Hour ( Get ( CurrentTimeStamp ) ));

GetAsText (Hour ( Get ( CurrentTimeStamp ) ))

)

$minute = Case(

Length (Minute ( Get ( CurrentTimeStamp ))) = 1;

"0" & GetAsText (Minute ( Get ( CurrentTimeStamp ) ));

GetAsText (Minute ( Get ( CurrentTimeStamp ) ))

)

$seconds =

Case(

Length (Seconds ( Get ( CurrentTimeStamp ))) = 1;

"0" & GetAsText (Seconds ( Get ( CurrentTimeStamp ) ));

GetAsText (Seconds ( Get ( CurrentTimeStamp ) ))

)

];

$year & $month & $day & $hour & $minute & $seconds

)

:) In your Let statement the 5th line [the one that begins "Length(Month......."] you have three left parentheses and two right parentheses. I don't know if this is all that might be wrong but try it and see. You need to add a right parenthesis [color:red]")" at the end of the line right before the equals sign. (like below)

.

.

Length(Month(Get(Current TimeStamp))[color:red])=1

The calculation is missing also 3 ";" ...

Each variable must be separated from the next one with a ";"

BTW: this is simpler:

Let([

t = Get ( CurrentTimeStamp ) ;

$year = Year ( t ) ;

$month = Right ( "00" & Month ( t ) ; 2 ) ;

$day = Right ( "00" & Day ( t ) ; 2 ) ;

$hour = Right ( "00" & Hour ( t ) ; 2 ) ;

$minute = Right ( "00" & Minute ( t ) ; 2 ) ;

$seconds = Right ( "00" & Seconds ( t ) ; 2 )

];

$year & $month & $day & $hour & $minute & $seconds

)

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.