Skip to main content

Notifications

Power Automate - Building Flows
Answered

Join two items with shared column value

Posted on by 241
I have 2 SP lists, one for Questions and one for Answers
 
In Answers i dont have question title, only questionID.
I need to get a new object based on answers item with title included.
 
 
 
 
 
I already got the Question item connected to the Answer item (From Filter Array)
but unsure how to join them from here.
 
 
 
 
Categories:
  • Verified answer
    Chriddle Profile Picture
    Chriddle 7,077 on at
    Join two items with shared column value
    A simple and powerful way to query elements (or their values) based on IDs is to use XPath.
    Then use addProperty to add the queried value to the object.
     
    An example:
    From: @{outputs('Compose-Questions')}
     
    Map:
    addProperty(
    	item(),
    	'Answer',
    	first(	
    		xpath(
    			xml(json(concat('{"Root": {"Item": ', outputs('Compose-Answers'),'}}'))),
    			concat('//Item[QuestionId="', item()['QuestionId'],'"]/Answer/text()')
    		)
    	)
    )
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard