Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4351 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.
 
 
 
Posted

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); "")
Posted
Let(
$Result1 =  
ExecuteSQL ( $SQL_SELECTfield1_FROM_Table & $$WHERE_FieldEQLs ;  ""; ¶; $Value1 ) ;
 
$Result2 =  
ExecuteSQL ( SQL_SELECTfield2_FROM_Table & $$WHERE_FieldEQLs ;  ""; ¶; $Value1);
"")
Posted
Let ( [
	$Result1 =  
		ExecuteSQL ( $SQL_SELECTfield1_FROM_Table & $$WHERE_FieldEQLs ; "" ; "" ; $Value1 ) ;
 
	$Result2 =  
		ExecuteSQL ( $SQL_SELECTfield2_FROM_Table & $$WHERE_FieldEQLs ; "" ; "" ; $Value1 )
] ;
	""
)

This topic is 4351 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.