I want to do two things (with some caveats)
- Check if a field, which might or might not exist, IsNull with the Message tool.
- Avoid getting an error warning that the field doesn't exist when adding the above to a Macro.
My use case is that I'm running a Rest API call using the Download tool. It returns some XML which I pass to the XML Parse tool.
If the call is successful, then the Parse Tool outputs a "createdAt" field. If not, it doesn't.
In the Message tool I have "IsNull([createdAt])"for the test.
I'm in a catch-22. When I add this to a macro and include it in a workflow, I get a Parse Error/Warning that the field [createdAt] doesn't exist. (the workflow runs fine..but the error is confusing if I want to share the macro with coworkers)
If I use the formula tool to create the field with a null then the warning goes away....
but...the XML Parse tool checks for before create the field so it creates it as [createdAt2] which is no good.
DynamicRename won't let me remove the 2 because [createdAt] already exists.
What is the best practice for this? It seems like a common use case, no?


Many Thanks,
Alex