Hi all SMEs,
Quick question:
I'm in process of learning batch macros. I created a very small sample sales data for my learning with two inputs.
1. Product orders - product + date + quantity
2. Product pricing - product + price
Batch macro provides output - product + price + order total. I have my desired output as order total however, I want to add the date and quantity ordered in the output which is where I am stuck. Input and macro is attached for reference.
Solved! Go to Solution.
hi @pdave87
you need to make sure that the input data contains the field you need to process.
The #1 step in creating a batch macro is to create a standard work flow that does exactly what you want to do.
Then, convert the standard workflow into the batch macro by determining:
1) what is (are) the dynamic field(s) that you want to change at every run of the batch?
2) Set control parameter(s) and Action tool(s) as appropriate.
If you have not already done so, I suggest that you check out the Interactive Lessons on Macro (https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Macros). I feel these are amongst the best-designed interactive lessons in the Academy and with about 1-2 hours of investment you can start doing macro with more confidence.
Dawn.
@DawnDuong I have completed my learnings through provided sessions. Thanks for the reference. I need clarity to bring two fields in the output. I will continue to explore other resources and,
I will look forward to any other SMEs available to support this query.
Hi Other SMEs,
Need some guidance on below batch macro:
I have the desired output of 'Order Total' in batch macro however, I want to further create output with another two dynamic fields i.e. Date and Quantity which is part of 'control input anchor' in my standard workflow (screen-print below)
Quick guidance will be highly appreciated. I know a way around this is to have these finds in macro input but this is a scenario wherein we have more than one dynamic fields in 'control input anchor'
Please assist.
Regards,
Pratik
hi @pdave87
Probably you did not understand what I was trying to say - or i did not say it clearly enough.
for data to be consumed by a macro and included in the output, it needs to be input via either the input anchor or the "inverted question mark anchor". The "inverted question mark anchor" is the data that needs to be updated at every batch run, i.e. pertaining to the 2nd bullet point.
You need 1 separate Control Parameter Tool for every field you want to input via the "Inverted question mark anchor":
Once you do this then the outcome the new fields as well as allowing you to split by order date.
Hope this helps you.
Last but not least... I saw the "other SME's" part after I've finished updating the reply and workflow. 😉 But I decided a ignore that snub in the spirit of trying to be helpful and nice to each other.
Cheers,
Dawn.
@DawnDuong I have a medical condition due to which I can't sit for longer hours and explore learnings extensively. Due to this condition I am out of the job but I wish to find new one as quickly as possible 🙂
Your quick support will be highly appreciated next time. I was not trying to snub but requesting for quicker support from other SMEs to help on this query so I can wrap up quickly with today's learnings.
Please don't exaggerate the comments as we are all doing our best to support each other.
Best Regards,
Pratik
You are welcome
@DawnDuong I am not happy with your responses. But I will ignore and appreciate the support. Thanks
Hi SMEs,
I am not able to derive the expected output. It's been a long day and with medical condition I don't wish to explain further 🙂 Any help on error would be great. I have looked up parsing errors on community post. There seems to be no known reason for this error in my macro workflow (at I can't seem to fix for now). My working file is attached for your reference if you wish to take a look and advise why this happens.
Always thankful to everyone.
Regards,
Pratik
hi @pdave87
The reason why you have this error is because there is no input field called [Quantity] in the current workflow setting.
Currently, the user input to the macro via the Control Parameter is named [#1]
Hence, in the formula edit box you need to type [#1] (you can just type the square bracket and then the drop down will show you all the available fields. The [#1] which is a user input is the last line.
Best practice is to give meaningful names to the Control Parameter user inputs so that when we write formula, it is easier to read.
For example in the picture below, you can see that the user input to the 2nd Formula Tool is renamed [Quantity Order], and the user input to the 3rd Formula Tool is renamed [Date]. Hence in the relevant formula editors, you can see that the field names = the Input names.
If the inputs are not renamed they will be automatedly [#1]
Hope it helps.
Dawn.
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
5 |