Need Help : Macro
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello Everyone,
I am working on a scenario wherein I am loading survey data(standard template) from a excel and extracting questionnaire and its responses, Its working fine if excel contains survey data for a person but my requirement is to loop through each person. I understand I should be using macro to achieve this however, I am not able to figure it out what parameter to pass in macro so that it loop through each row and its corresponding columns and perform same set of activity for each. so result should have details of 'ABC' sender too
Please can some one advise.
Thank you.
Solved! Go to Solution.
- Labels:
- Macros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
For the Macro, you can make it a Standard Macro and use a Macro input tool. You will need to provide the template schema which could be the file with 1 or 2 rows of data that is in the format you are needing. I have attached the macro you created with some changes to show how this would work. In my example, I used the Text Input example but the File Input with a template file would work as well. Please mark done if this answers your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@abacon Thank you for your replying. Apologies but I am not able to understand and final result is not as excepted. I can see result are( like cross join) and also for ABC response for Q1 is incorrect (should be 7 instead of 5). My understanding was that macro will run for each row and do transformation and generate result and then move to next row so my final result set would look like 2 rows with Sender details, questionnaire and there responses. Please pardon if I am missing anything obvious. Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Ok, I see what you mean. I believe I didn't fully understand your question, this helps clear it up. Let me dig in a bit further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here you go, these are updated workflows. You need both a Macro input and a control parameter, I have added a formula tool in the Macro with the column RecordID set to 1. That is the field you will both group on and use to iterate through the records. Additionally the output appears to be correct based on your provided examples.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@abacon , Sorry I was not very clear in my original post. The updated workflow works like charm. Thanks again for explaining macro input and the logic for iteration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You're very welcome, glad to help out!
