I thought I saw this before, but after an hour of looking, I cant find it. Simply put. I have two arrays, with a common DocumentID. I just need to JOIN them goether ON DocumentID (using SQL lingo)
Array1:
[
{
"DocumentID": 1265,
"PartNumber": "510009",
"Rev": "1",
"Description": "KBOV HANDLE BRACKET ASSEMBLY"
},
{
"DocumentID": 2338,
"PartNumber": "KBV8-N-FW",
"Rev": "0",
"Description": "KBV8-N-FW GENERAL ARRANGEMENT & BOM"
},
{
"DocumentID": 5522,
"PartNumber": "213155",
"Rev": "0",
"Description": ".125 X .50 DOWEL PIN CS"
}
]
Array2:
[
{
"DocumentID": 1265,
"Comment": "."
},
{
"DocumentID": 2338,
"Comment": "Exploded view still WIP."
},
{
"DocumentID": 5522,
"Comment": "."
}
]
This is what I want:
[
{
"DocumentID": 1265,
"PartNumber": "510009",
"Rev": "1",
"Description": "KBOV HANDLE BRACKET ASSEMBLY",
"Comment": "."
},
{
"DocumentID": 2338,
"PartNumber": "KBV8-N-FW",
"Rev": "0",
"Description": "KBV8-N-FW GENERAL ARRANGEMENT & BOM",
"Comment": "Exploded view still WIP."
},
{
"DocumentID": 5522,
"PartNumber": "213155",
"Rev": "0",
"Description": ".125 X .50 DOWEL PIN CS",
"Comment": "."
}
]
I'm sure there is a simple expression for this.
Solved! Go to Solution.
Hi @martinav
I am not sure if you have already solved your issue but i find this interesting and thought of spending some time on it. i finally able to make it work (dont think its a best solution and i may need to work on improving it) but its working.
i uploaded working flow at github:
https://github.com/DeepakS22/DPowerAutomate/blob/master/MergeJSON_20200327174700.zip
Have a look and let me know if that helps.
Regards,
@martinav - Have you tried using the "Append to an Array variable"? Here is a video that covers this: https://www.youtube.com/watch?v=VAfwiN-vARQ
Append adds records. It does not add items, or "columns" depending on data source. If you see my data examples, its merging or joining records keyed on DocumentID. Again, terms depending on the system you are familiar with, SP, SQL, etc.
I could get there if there is a way to use an expression to get the current item() from these two select functions. I could combine together. Of course none of the attempts to write the expression work.
Results:
Ive wasted an entire day on this. This is one of those times I loathe this system. This is so forking simple. Has to be a way to do it.
Cant go back to the filter array either. This is absurd.
WDL limitations are usually frustrating.
I have managed to join elements from two different arrays (lets call them 'myInput1Array' and 'myInput2Array') when both elements shared a common property value, but it is very time consuming both on the design and on the performance.
So, you need to initialize a third array variable, let's call it 'myOutputArray', leave it empty for the moment.
Now, you use an Apply to each and assign as its input 'myInput1Array'
Inside the Apply to Each, you add a Filter Array and assign as its input 'myInput2Array', try to match common property value from current Apply to each iteration. Now you make sure a single match, if so, Append to array variable, name 'myOutputArray', value:
setProperty(setProperty(setProperty(json('{}'),'Property1FromArray1Name','Value'),'CommoProperty','Value'),Property1FromArray2Name','Value')
So, property values from myInput1Array are obtained from
items('Apply_to_each')
And, property values from myInput2Array are obtained from
first(body('Filter_array'))
As I mentioned, very inneficient but saved my day
Hope this helps
You have NO idea how much I appreciate the help of others here. I am working through this solution. I think of myself as pretty savvy with this type of thing, but I will tell you. The absolute convolution of how many things work in this system is very troubling. I am completely dumbfounded on how people come up with solutions like this. Even with the answer right in front of me, and using the SAME names, etc, it is still very difficult to get everything right to make it work. I'm still working on it, and will report back when its working. I need to implement this solution to several flows.
Its funny, because to do the exact same thing in powerapps is also a trick. I can get my head around it better, but it took a while to figure out the ForAll() statement. What is sooo simple in SQL (JOIN statement). I still have to study what I did on other apps in order to use it again, but I have a solution on that side of the power platform. I do find it interesting that these tools are designed as "code free", but when it comes down too it, you have to know more different types of code in order to get things to work the way you want. If you are super simple, you can get out of it, but if you do anything of real depth, then you have to figure out MANY different languages. ODATA, JSON, and Expressions (flow) just to name a couple. Doing the same type of thing in PowerApps compared to Flow is an entirely different animal and requires very different knowledge.
Sorry, I'm whining a bit. I'll report on progress.
Hi!
I understand your concerns: PowerApps with its own language, Power Automate too, ODATA... sometimes is a bit frustrating... The dream of zero code is still a dream, even thought Microsoft is putting lots of efforts to help us
Hope your story will have a happy ending... please let us know your progress on your challenge
Thanx!
Hi @martinav
I am not sure if you have already solved your issue but i find this interesting and thought of spending some time on it. i finally able to make it work (dont think its a best solution and i may need to work on improving it) but its working.
i uploaded working flow at github:
https://github.com/DeepakS22/DPowerAutomate/blob/master/MergeJSON_20200327174700.zip
Have a look and let me know if that helps.
Regards,
@DeepakS ,
Oh, I most certainly have not resolved my issue. I thought it would be easy to just make a SQL View, because it is a simplified form of a view I already have. However, that also is failing, and I have beat on it for several hours. Side-by side comparison with an existing, and its been expressly perfect, but does not work. I'm about to bail on this.
However, I was surprised by your post. Of course, I'm confronted once again with an unknown, and unintuitive task... which is how the hello do you import a flow from what you have given. Especially since I had no idea that you could even export them.
I will try it if this task is not a multi-hour challenge.
Any direction on where to go to do this?
Thank you.
Hi @martinav
Yes you can export/import. to import my flow just download it as it is and import here is an screen:
@DeepakS ,
Huh, well, lookie there. That works. I was dancing around this for hours. Looks like you saved me a few more.
Nice job!
@DeepakS ,
A little update. I added an additional source to merge. Thus, I'm merging three arrays together. Its as "simple" (after getting all of the syntax, language and usage correct) as adding another nested loop. The disadvantage to this is it took over 2 minutes to run this part of the flow with 6 items in the items being acted upon. Its only a once a day notification, so PA isnt waiting on it. But, it is something to keep in mind. Even two loops deep with 6 items tool over a minute to execute. This will never be a large number. I doubt it ever gets over 10 items, but that is something to consider with this method. Of course, I'm not sure there is another method out there. This is by far the simplest I saw. Props to @DeepakS for this!
Hi @martinav
Yes , even i am not fully like my approach but as of now cant think of any other method, as we are merging two multi filed JSON :(. i can tell its complex in C# too ;).
This weekly series is our way of helping the amazing members of our community--both new members and seasoned veterans--learn and grow in how to best engage in the community! Each Tuesday, we will feature new areas of content that will help you best understand the community--from ranking and badges to profile avatars, from Super Users to blogging in the community. Our hope is that this information will help each of our community members grow in their experience with Power Platform, with the community, and with each other! Have you ever wondered how your fellow community members earn the different ranks available? What is the difference between an Advocate and a Helper, a Solution Sage and a Community Champion? In today's #TuesdayTip, we share the secrets and tips to help YOU keep your ranking growing--and why it's so important to our communities. What are community ranks? - Power Platform Community (microsoft.com) Get the details in this Knowledge Base article that shows you what ranks are, how they are achieved, and what they mean to you as you engage with other community members on a regular basis. Once you start your journey in the community, ranking up, you'll find the benefits. So get busy with those kudos, solutions, and more! We can't wait to see how you rank!That's it for this week. Tune in for more Tuesday Tips next Tuesday and join the community as we continue to get "Back to Basics."
After all the planning and preparing, the annual Microsoft Power Platform Conference is finally here! We are excited to see so many of our community in Las Vegas this week. To help make sure you don't miss any of the workshops, sessions, and events we have planned, make sure to check out this handy Community One-Sheet, and download the pdf today! Make sure to stop by the Community Lounge to meet @hugobernier, @EricArcher, @heaher_italent, and @AshleyFelts from our team!
Join us for the first-ever the Biz Apps Community User Group meeting live from the Power Platform Conference! This one hour user group meeting is all about discovering the value and benefits of User Groups! Discover how you can find a group in your local area or about specific topics where you can learn new skills and meet like-minded people as a user group member. Hear from User Group leaders about why they do what they do and what resources they receive to help them succeed as community ambassadors. If you have never attended a User Group meeting before, this will be a great introduction! We hope you are inspired to find a group that meets your unique interests! October 5th at 2:15 pm Pacific time If you're attending #MPPC23 in Las Vegas, join us in person! Find out more here: https://powerplatformconf.com/#!/session/Biz%20Apps%20Community%20User%20Group%20Meeting%20-%20Live%20from%20MPPC/6172 Not at MPPC23? Attend vvirtually by registering here: https://aka.ms/MPPCusergroupmeeting2023 If you can't attend this meeting live, don't worry! We will record this meeting and share it with the Community at powerusers.microsoft.com
We are excited to kick off our new #TuesdayTIps series, "Back to Basics." This weekly series is our way of helping the amazing members of our community--both new members and seasoned veterans--learn and grow in how to best engage in the community! Each Tuesday, we will feature new areas of content that will help you best understand the community--from ranking and badges to profile avatars, from Super Users to blogging in the community. Our hope is that this information will help each of our community members grow in their experience with Power Platform, with the community, and with each other! This Week's Tips: Account Support: Changing Passwords, Changing Email Addresses or Usernames, "Need Admin Approval," Etc.Wondering how to get support for your community account? Check out the details on these common questions and more. Just follow the link below for articles that explain it all.Community Account Support - Power Platform Community (microsoft.com) All About GDPR: How It Affects Closing Your Community Account (And Why You Should Think Twice Before You Do)GDPR, the General Data Protection Regulation (GDPR), took effect May 25th 2018. A European privacy law, GDPR imposes new rules on companies and other organizations offering goods and services to people in the European Union (EU), or that collect and analyze data tied to EU residents. GDPR applies no matter where you are located, and it affects what happens when you decide to close your account. Read the details here:All About GDPR - Power Platform Community (microsoft.com) Getting to Know You: Setting Up Your Community Profile, Customizing Your Profile, and More.Your community profile helps other members of the community get to know you as you begin to engage and interact. Your profile is a mirror of your activity in the community. Find out how to set it up, change your avatar, adjust your time zone, and more. Click on the link below to find out how:Community Profile, Time Zone, Picture (Avatar) & D... - Power Platform Community (microsoft.com) That's it for this week. Tune in for more Tuesday Tips next Tuesday and join the community as we get "Back to Basics."
Are you attending the Microsoft Power Platform Conference 2023 in Las Vegas? If so, we invite you to join us for the MPPC's Got Power Talent Show! Our talent show is more than a show—it's a grand celebration of connection, inspiration, and shared journeys. Through stories, skills, and collective experiences, we come together to uplift, inspire, and revel in the magic of our community's diverse talents. This year, our talent event promises to be an unforgettable experience, echoing louder and brighter than anything you've seen before. We're casting a wider net with three captivating categories: Demo Technical Solutions: Show us your Power Platform innovations, be it apps, flows, chatbots, websites or dashboards... Storytelling: Share tales of your journey with Power Platform. Hidden Talents: Unveil your creative side—be it dancing, singing, rapping, poetry, or comedy. Let your talent shine! Got That Special Spark? A Story That Demands to Be Heard? Your moment is now! Sign up to Showcase Your Brilliance: https://aka.ms/MPPCGotPowerSignUp Deadline for submissions: Thursday, Sept 28th How It Works: Submit this form to sign up: https://aka.ms/MPPCGotPowerSignUp We'll contact you if you're selected. Get ready to be onstage! The Spotlight is Yours: Each participant has 3-5 minutes to shine, with insightful commentary from our panel of judges. We’re not just giving you a stage; we’re handing you the platform to make your mark. Be the Story We Tell: Your talents and narratives will not just entertain but inspire, serving as the bedrock for our community’s future stories and successes. Celebration, Surprises, and Connections: As the curtain falls, the excitement continues! Await surprise awards and seize the chance to mingle with industry experts, Microsoft Power Platform leaders, and community luminaries. It's not just a show; it's an opportunity to forge connections and celebrate shared successes. Event Details: Date and Time: Wed Oct 4th, 6:30-9:00PM Location: MPPC23 at the MGM Grand, Las Vegas, NV, USA
The Reading Dynamics 365 and Power Platform User Group is a community-driven initiative that started in September 2022. It has quickly earned recognition for its enthusiastic leadership and resilience in the face of challenges. With a focus on promoting learning and networking among professionals in the Dynamics 365 and Power Platform ecosystem, the group has grown steadily and gained a reputation for its commitment to its members! The group, which had its inaugural event in January 2023 at the Microsoft UK Headquarters in Reading, has since organized three successful gatherings, including a recent social lunch. They maintain a regular schedule of four events per year, each attended by an average of 20-25 enthusiastic participants who enjoy engaging talks and, of course, pizza. The Reading User Group's presence is primarily spread through LinkedIn and Meetup, with the support of the wider community. This thriving community is managed by a dedicated team consisting of Fraser Dear, Tim Leung, and Andrew Bibby, who serves as the main point of contact for the UK Dynamics 365 and Power Platform User Groups. Andrew Bibby, an active figure in the Dynamics 365 and Power Platform community, nominated this group due to his admiration for the Reading UK User Group's efforts. He emphasized their remarkable enthusiasm and success in running the group, noting that they navigated challenges such as finding venues with resilience and smiles on their faces. Despite being a relatively new group with 20-30 members, they have managed to achieve high attendance at their meetings. The group's journey began when Fraser Dear moved to the Reading area and realized the absence of a user group catering to professionals in the Dynamics 365 and Power Platform space. He reached out to Andrew, who provided valuable guidance and support, allowing the Reading User Group to officially join the UK Dynamics 365 and Power Platform User Groups community. One of the group's notable achievements was overcoming the challenge of finding a suitable venue. Initially, their "home" was the Microsoft UK HQ in Reading. However, due to office closures, they had to seek a new location with limited time. Fortunately, a connection with Stephanie Stacey from Microsoft led them to Reading College and its Institute of Technology. The college generously offered them event space and support, forging a mutually beneficial partnership where the group promotes the Institute and encourages its members to support the next generation of IT professionals. With the dedication of its leadership team, the Reading Dynamics 365 and Power Platform User Group is poised to continue growing and thriving! Their story exemplifies the power of community-driven initiatives and the positive impact they can have on professional development and networking in the tech industry. As they move forward with their upcoming events and collaborations with Reading College, the group is likely to remain a valuable resource for professionals in the Reading area and beyond.
User | Count |
---|---|
25 | |
22 | |
22 | |
19 | |
14 |
User | Count |
---|---|
46 | |
32 | |
30 | |
23 | |
21 |