Jump to content
Sign in to follow this  
HALBURN

Is it possible to use a Let variable to verify the value of a global variable?

Recommended Posts

Could this be done using a Let

$SelectedSearchColumn = first_name and $$first_name = "descending"

For example, can I do something like this?

("$" & ~varName) = "descending"

This is my attempt...which does not work.

Let ( [
    ~varName = "first_name"
    ] ;
    $SelectedSearchColumn = ~varName and ("$$" & ~varName) = "descending"
)

Share this post


Link to post
Share on other sites

Not sure what you're trying to do here. What exactly does "verify the value of a global variable" mean?

 

 

 

Perhaps you meant something like =

Let ( [
varName = "first_name"
] ;
Evaluate ( "$$" & varName ) = "descending"
)

This would return true if a previously declared global variable named $$first_name exists and its value is "descending". Though why would this be preferable to simply =

$$first_name = "descending"
Edited by comment
  • Like 1

Share this post


Link to post
Share on other sites

Sorry, I did not do a good job asking the question but you solved the problem for me.

 

This worked:

$SelectedSearchColumn = varName and Evaluate ( "$$" & varName ) = "descending"

Thanks!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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