Hi Alteryx Community!
I am new to creating macros and am running into some trouble. I am using a a "Text Input" in the Macro Input tool. The Macro is asking the user to choose:
1) Primary Key Field
2) Latitude Field
3) Longitude Field
As expected, the Macro's output keeps the name of these three fields as "Primary Key", "Latitude", and "Longitude". However, I would like the Primary Key field to be renamed to whatever the user selects to use as their primary field (rather than the output simply calling that column Primary Key)
For example, if the user selects Store, City, or SiteNumber as the Primary Key input.... then the output should also be Store, City, or SiteNumber (rather than it defaulting back to being called "Primary Key")
Thanks!
Solved! Go to Solution.
The way i do this is to do what appears to be the case now, i.e. they are renaming, thus it moves through the workflow as Primary key, latitude and longitude, I then place a select at the end of the workflow, which through an action from the drop down interface tools renames them back to what they were as specified by the user.
If you were to upload your example workflow perhaps I could intergrate this solution for you.
Ben
So *that's* what that does! Totally useful (if obscure) feature. Thanks!
@Korpelak - can you package up this workflow so the macro is included? In Designer, Options > Export Workflow
Thanks!
@Korpelak - looks like you just need to move the Action tool to the end of the workflow (having it at the beginning was changing the fields immediately, so the macro was referencing fields like "Summarize" and since it was renamed, it couldn't find it). Also, the Action tool is looking for an exact match on field name - since you are mapping the user inputted field to the field "Summarize", if you don't have the field "Summarize" in the Select tool the Action is acting on, it won't know which field name to update. I just changed the field name from "Summarize On" to "Summarize" in the Select prior to the Formula.
thank you @SophiaF, it works! Oh I am so grateful for this community, I stared at this for hours last Friday.
Karina