The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Retrieve data from an attribute inside a string
achint_kumar
Member Posts: 16 Contributor II
Hi All,
I am working on automating a manual process in order to make MINIMAL changes for running data for a new Wave/duraation etc. For that i am want to print a value from attribute inside a string. Please see example below:
I have assigned Year in YYYY variable as YYYY=2018
When i am using generate attribute, i am setting value in a variable like:
if(Name == "Achint","Jan-[YYYY]")
In the above, RM is taking "Jan-[YYYY]" as string, although i want it to print Jan-2018
Looking forward to hearing from you.
I am working on automating a manual process in order to make MINIMAL changes for running data for a new Wave/duraation etc. For that i am want to print a value from attribute inside a string. Please see example below:
I have assigned Year in YYYY variable as YYYY=2018
When i am using generate attribute, i am setting value in a variable like:
if(Name == "Achint","Jan-[YYYY]")
In the above, RM is taking "Jan-[YYYY]" as string, although i want it to print Jan-2018
Looking forward to hearing from you.
Tagged:
0
Best Answer
-
oju987 Member Posts: 4 Contributor IHave you tried using the variable outside the quotation marks. Something like:
if(Name == "Achint",concat("Jan-",[YYYY]))
5