web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Custom question answer...
Power Automate
Answered

Custom question answers from Bookings to each SharePoint Column

(1) ShareShare
ReportReport
Posted on by 4
Hello, 
 
I have several questions and answers in Bookings that I would like to have answered in it's separate column in SharePoint however for now it spits out all of the questions/ answers in one column.  How can I automate this for each question to land in its prospective column? 
For instance it looks like:
<div class="ExternalClassF815EA085B944D0498744012"><p class="editor-paragraph"><strong>Case Name</strong>Shrek<br>
<strong>Case Number</strong>11525 <br>
<strong>Region</strong>5<br> 
<strong>Who are the mental health concerns related to?</strong>Parent<br>
<strong>Was the child previously adopted?</strong>No<br>
<strong>Where is the child currently located?</strong>Adult Jail
<strong>Case Name</strong>Shrek<br>
<strong>Case Number</strong>11525 <br>
<strong>Region</strong>5<br> 
<strong>Who are the mental health concerns related to?</strong>Parent<br>
<strong>Was the child previously adopted through DFPS?</strong>No<br>
<strong>Where is the child currently located?</strong>Adult Jail
</p></div>
I have the same question (0)
  • Verified answer
    Chriddle Profile Picture
    8,708 Super User 2026 Season 1 on at
    One way to do this is with XML:
     
    Compose-JSON
    json(
    	xml(
    		replace(
    			outputs('Compose-HTMLData'),
    			'<br>',
    			''
    		)
    		
    	)
    ).div
    Select
    From:
    range(
    	0,
    	length(outputs('Compose-JSON').p.strong)
    )
    Map Key:
    outputs('Compose-JSON').p.strong[item()]
    Map Value:
    slice(
    	outputs('Compose-JSON').p['#text'][item()],
    	0, -1
    )
    Compose
    json(
    	replace(
    		slice(
    			string(body('Select')),
    			1, -1
    		),
    		'},{',
    		','
    	)
    )
     
     
     
     
    Assuming the missing <br> in the 8th line of your HTML code is a copy error, you can also replace the Compose-JSON and the Select above with this one, which looks a bit nicer:
    From:
    json(
    	xml(
    		replace(
    			outputs('Compose-HTMLData'),
    			'<br>',
    			'</p><p>'
    		)
    		
    	)
    ).div.p
     
    Map Key:
    item().strong
     
    Map Value:
    trim(item()?['#text'])
     
  • Verified answer
    Chriddle Profile Picture
    8,708 Super User 2026 Season 1 on at
    Maybe it's easier with string operations:
    Select_2
    From:
    skip(split(outputs('Compose-HTMLData'), '<strong>'), 1)
    Map Key:
    split(
    	item(),
    	'</strong>'
    )[0]
    Map Value:
    trim(
    	slice(
    		split(
    			item(),
    			'</strong>'
    		)[1],
    		0,
    		indexOf(
    			split(
    				item(),
    				'</strong>'
    			)[1],
    			'<'
    		)
    	)
    )
     
    Compose_2
    json(
    	replace(
    		slice(
    			string(body('Select_2')),
    			1, -1
    		),
    		'},{',
    		','
    	)
    )

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard