Pages

Monday, 10 February 2020

Building a Better Record ID tool ...


Whilst visiting the Shambles in York, I was treated to a set of ACE inspired ghosts from my friend and fellow ACE, Rafal Olbert.  We searched the community of ghosts at the Ghost Merchant for the perfect trio of goblins to complete the set.  If you notice the coloring, they closely resemble the ACE logo on Raf's polo.  Who except us would spend the time rummaging through hundreds of ghosts to complete this task?
Now comes the question that you might be asking, "What does this have to do with CReW macros?"  It has everything to do with them.  Often there will be a simple task that has to be configured by many in the community.  The time spent in configuring a task could be better spent elsewhere (e.g. visiting York with friends).

There are multiple posts in the Alteryx Community asking how to get unique record IDs on groups of records.  There are also multiple ideas in the community to modify the functionality of the RecordID tool.  James Dunkerley presented at Inspire 2020 on the magic of modifying XML.  One example that he showed was the adding of the grouping functionality to the Record ID.

I grabbed a copy of his macro and have had it waiting for an opportunity to release it to the CReW user-base.  If you think about the construction of a macro that allows for GROUPING, you'll realize that the dynamic nature of grouping requires you to build a solution that allows for multiple (any) selections of fields from the incoming data stream.  James solved the grouping by modifying the XML in a formula:

IIF(IsEmpty([#1]) OR [#1]='""', "<GroupByFields />", 
'<GroupByFields><Field field=' 
+ Replace([#1], '","', '"/><Field field="')
+ '/></GroupByFields>')+ "/*" + [#1] + "*/"

He's modifying the XML of a standard Multi-Row Formula to update the GROUP BY parameter.  When no fields are selected, the resulting xml (grouping) looks like this:

<GroupByFields />

If the incoming data has three (3) fields selected for grouping, the results need to look like this:

<GroupByFields>
   <Field field="Field1"  />
   <Field field="Field2"  />
   <Field field="Field3"  />
</GroupByFields>

The macro is configured to read the incoming metadata and will populate a LIST BOX interface tool with all of the incoming fields.  When the user selects the fields (e.g. Field1, Field2, Field3), the question results are passed to an ACTION tool as a comma delimited series of values.  James then creates a formula to modify the output to produce the XML component displayed above.

If James had attended the BUILD 2 event in Nashville, this was one of the challenges posed.  He would have won that event.

If you'd like to download a copy of the macro, it is in the Alteryx Gallery and can be found here . Any feedback is welcomed.

Cheers,

Mark

34 comments:

  1. Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. Gebäudereinigung Hardegsen

    ReplyDelete
  2. I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. Asheville Property Management

    ReplyDelete
  3. It is dependent upon you to ensure that in case you are utilizing a developer to take care of your job that they comprehend from the start whether they are assuming liability for guaranteeing that building work follows the Building Regulations. Tree Trimming Pearland

    ReplyDelete
  4. Thanks for your post. I’ve been thinking about writing a very comparable post over the last couple of weeks, I’ll probably keep it short and sweet and link to this instead if thats cool. Thanks. Charles

    ReplyDelete
  5. I cannot thank you enough for the blog. Really thank you! Great.
    Top rated tree care Lexington

    ReplyDelete
  6. Thank you so much for the post you do. I like your post and all you share with us is up to date and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job. Charles

    ReplyDelete
  7. You can also post some posters which contains specific information that clients would want to know. Emergency Tree Service Nashville, TN

    ReplyDelete
  8. It is included in my habit that I often visit blogs in my free time, so after landing on your blog. I have thoroughly impressed with it and decided to take out some precious time to visit it again and again. Thanks. https://electric-generator-1.blogspot.com/2021/09/singapore-storage-space-costs-price.html

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. It is the craft of designing a home to speak to all preferences and in this way will interest a more extensive scope of possible purchasers. houses for sale hidden hills

    ReplyDelete
  11. Property venture items give freedom to capital gains just as customary occasional earnings. downtown la penthouses for sale

    ReplyDelete
  12. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good work https://thesingaporestorage1.my-free.website/

    ReplyDelete
  13. Thanks for the post. Really thank you! Much obliged.real estate developer cambodia

    ReplyDelete
  14. Getting the right project worker will establish the vibe for how your whole experience goes, so ensure you discover somebody very much suggested. In the event that they have given references, utilize these, call them, and get some information about the worker for hire.house extensions dublin

    ReplyDelete
  15. hello!! Very interesting discussion glad that I came across such informative post. Keep up the good work friend. Glad to be part of your net community. Gebäudereinigung Göttingen

    ReplyDelete
  16. This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck read more

    ReplyDelete
  17. Nice post. I was checking constantly this blog and I’m impressed! Extremely useful info specially the last part I care for such information a lot. I was seeking this certain info for a long time. Thank you and good luck.building an ADU

    ReplyDelete
  18. Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. building oceania v

    ReplyDelete
  19. https://twitchviral.com/ If you want to be a professional gamer you need special gaming grade hardware to perform well in your game. Ordinary computer components lacks the features needed to create ideal environment for game-play. Powerful processing and high storage, speedy and clear communication, accuracy and precision, comfortable gameplay and other advanced features to interact with the game.

    ReplyDelete
  20. I was looking at some of your posts on this website and I conceive this web site is really instructive! Keep putting up.. building the peninsula aventura For Sale

    ReplyDelete
  21. It was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. building the peninsula one aventura

    ReplyDelete
  22. The best protection against identity theft, without doubt, is identity theft prevention. A recent article in USA Today shows how identity theft can happen. An identity theft ring hacked into Marshall Department Store's main computer and stole thousands of credit card numbers. The ring members then traveled throughout Florida using these stolen credit card numbers to charge high-value merchandise at stores like WalMart. fake id

    ReplyDelete
  23. I wish more writers of this sort of substance would take the time you did to explore and compose so well. I am exceptionally awed with your vision and knowledge. Magnesite floor

    ReplyDelete
  24. This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion, thank you. Balustrade Railing

    ReplyDelete
  25. I read this article. I think You put a great deal of exertion to make this article. I like your work. wylewki anhydrytowe

    ReplyDelete
  26. This is a splendid website! I"m extremely content with the remarks!. fake id website

    ReplyDelete
  27. The most interesting text on this interesting topic that can be found on the net ... Satta king game

    ReplyDelete
  28. This is very interesting content! I have thoroughly enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great. pianobeton

    ReplyDelete
  29. I think this is an informative post, and it is beneficial and knowledgeable. Therefore, I would like to thank you for your efforts in writing this article. I enjoy reading your post. If you've been thinking about replacing your flat roof, you should know about best roofing contractors near me

    ReplyDelete
  30. I read your post and got it quite informative.춘천노블홈타이
    태백노블홈타이
    김천노블홈타이
    문경노블홈타이
    상주노블홈타이
    안동노블홈타이
    영천노블홈타이
    영주노블홈타이 I couldn't find any knowledge on this matter prior to. I would like to thanks for sharing this article here.

    ReplyDelete