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.

Basic Let question

Featured Replies

How do I declare a variable which is the result of a Let function? The following is inside an Execute SQL step but I don't think that matters:

 

 

Let([
 
~sql1 = $SQL_SELECTid  & $WHERE_Parentid
 
];
 
ExecuteSQL ( ~sql1; "" ; ¶; $Currnt_PREMid))
 
What I want to do is to define multiple ~sql statements inside the first part of the Let statement and then have their results convert into variables which I can use for other calculations either inside this step or in other steps. I tried the following but it returns a "?". The overall goal here is to make my calculations more compact and readable.
 
Let([
 
~sql1 = $SQL_PARENTid  & $WHERE_PREMid //I want to have multiple sql var steps here
 
];
 
Let ($result1 = ExecuteSQL ( ~sql1; "" ; ¶; $Currnt_PREMid); "")) //I want to have multiple result var's declared here.
 
 
 
  • Author

Whoops, I think I've got this working as I had some mismatching variable names causing the calcs to fail. So far I got this working by setting the following inside a Execute SQL step:

 

 

Let( $Result1 =  
ExecuteSQL ( $SQL_SELECTfield1_FROM_Table & $$WHERE_FieldEQLs ;  ""; ¶; $Value1 ); "") &
 
Let( $Result2 =  
ExecuteSQL ( SQL_SELECTfield2_FROM_Table & $$WHERE_FieldEQLs ;  ""; ¶; $Value1); "")
Let(
$Result1 =  
ExecuteSQL ( $SQL_SELECTfield1_FROM_Table & $$WHERE_FieldEQLs ;  ""; ¶; $Value1 ) ;
 
$Result2 =  
ExecuteSQL ( SQL_SELECTfield2_FROM_Table & $$WHERE_FieldEQLs ;  ""; ¶; $Value1);
"")
Let ( [
	$Result1 =  
		ExecuteSQL ( $SQL_SELECTfield1_FROM_Table & $$WHERE_FieldEQLs ; "" ; "" ; $Value1 ) ;
 
	$Result2 =  
		ExecuteSQL ( $SQL_SELECTfield2_FROM_Table & $$WHERE_FieldEQLs ; "" ; "" ; $Value1 )
] ;
	""
)
  • Author

Much obliged!

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.