Community & Support
Learn
Marketplace
Discussions
Categories
Discussions
General
Platform
Academic
Partner
Regional
Explore Siemens Communities
User Groups
Documentation
Events
Altair Exchange
Share or Download Projects
Resources
News & Instructions
Programs
YouTube
Employee Resources
This tab can be seen by employees only. Please do not share these resources externally.
Groups
Join a User Group
Support
Home
Discussions
Community Q&A
Can I pass macro in extract macro
sgnarkhede2016
Hello,
I want to pass attribute name dynamically as loop iteration like in 1st iteration in "attribute name" is "attribute_1" in second "attribute_2" and so on.
when i checked in generate attribute this macro gives correct result what i want "SCENARIOPARAMETER_"+%{iteration}" but same when i passed in extract macro giving error " attribute not present in input data" and hardcoded workling
Find more posts tagged with
AI Studio
MacOS
Macros
Accepted answers
All comments
MartinLiebig
Hi,
i guess you want to use the attribute function. to access the value of attribute_%{iteration} you usually do
attribute("attribute_"+%{iteration})
There are some more things you can do with the # notation instead of %, but i always forget them and need to ask
@David_A
Best,
Martin
David_A
Hi,
the
attribute()
function is exactly the thing you're looking for. It will resolve the macro value first and and then looks the combined string as an attribute name. With the
#
you could basically do the same, but the function is the more readable approach.
Best,
David
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)
Groups