Hi Santanu,
You do need to use it in a function vs direct field assignment such as DBQuery to use it directly as %Env%. You can also use as an Input card value. Might try a type tree with a single text field and Echo with your %Env% - I've only used File %mdqname% to point to the MDQ file needed so I am not 100% positive this will work but in theory it should.
There are other ways to retrieve values as well. I made use of Flow Variables to store the Resource Registry values I needed so I could use them throughout the map with only one call out to the Registry. This method required storing the path to your MRC files in the computer's environment variables (and use GETENV) and then using the resource lib functions to retrieve values if needed outside DBQuery etc. But for your purposes if all you want is to identify the env you might just do this directly in the computer's environment variables and simplify to just GETENV. You parse the computer name to derive Env for example if there is an indicator in the name.
=resourcelib->GETRESOURCEALIAS(resourcelib->GETENV(<env var name>), %Env%)
Where the <env var name> system (os) environment variable points to the mrc file with your resource variables. This way you don't have to hardcode the path in the rule for manual retrieval.
Hope this helps,
Lisa
------------------------------
Lisa Edwards
Software Engineer / Subject Matter Expert
Rainbow Data Systems, Inc
------------------------------
Original Message:
Sent: Tue December 05, 2023 06:36 AM
From: Santanu Baral
Subject: Resource Registry
Hi,
I have a mapping for environment,"T" for lower env and "P" for production.
I have created a Resource Alias called "Env" with value "T" in windows.
I configured the mrc file in windows preferences->Run option and i did the mapping as Field1=%Env%
But resource alias is not getting resolved.
is resource alias can resolve directly in mapping rule or it only resolved in external functions like dblookup,dbquery..etc
Thanks
Santanu
------------------------------
Santanu Baral
------------------------------