Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I am trying to write some Fire code based on whether an environment variable exists (like if (defenv(MYVAR) && envval(MYVAR))). Is there a Fire command to find out if an environment variable is defined before using envval on it?

0
Posted

I am trying to write some Fire code based on whether an environment variable exists (like if (defenv(MYVAR) && envval(MYVAR))). Is there a Fire command to find out if an environment variable is defined before using envval on it?

0

You can actually define your own function to do this by taking advantage of the err_level system identifier which filters out error messages above a given threshold of severity (1=most severe, 10=least severe). The Environment Variable undefined message is a severity 6 message – so setting err_level to 5 will stop it appearing.

Related Questions

Experts123