Jump to content

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


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

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"
)
Link to comment
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
Link to comment
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!

Link to comment
Share on other sites

This topic is 3365 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.