Hello,
Is it possible to set a in_Argument default value based on Asset ? So when i call the workflow with null arg it takes the Asset value.
When i put a variable in default input from data manager it returns :
workflow.xaml: CS0103: The name ‘assetName’ does not exist in the current context
Hey @simon.l
You can’t use an Asset directly as a default value for an argument because the default field can’t run activities like Get Asset. That’s why you get the error - this logic only works at runtime.
The approach you shared with an Assign and string.IsNullOrEmpty() is the right way to go. It allows you to fall back to the Asset value if no argument is passed, which is exactly what you’re trying to achieve.
You can use this expression - This way, if in_Arg is null or empty, the fallback value from assetVar will be used instead. If(String.IsNullOrEmpty(in_Arg), assetVar, in_Arg)