cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
naemea
Regular Visitor

SharePoint multiple lines fields into Approval markdown table

Hello,

 

I'm trying to create an approval table with markdown, but I can't get the desired result when I have multiple lines in my SharePoint fields.

 

Example of SharePoint fields:

 

PRODUCTPRICE APRICE BOFFER

A

B

C

1

2

3

4

5

6

D

E

F

 

I've tried with a Select to get the JSON schema and this kind of does something, but what I got looks like this:

 

naemea_2-1635196217029.png

 

 

Is there a way to loop through the array and get each item at line break to correctly create the rows?

 

Let me know if I can provide more details.

 

Thanks for your time.

7 REPLIES 7
MarvinBangert
Solution Sage
Solution Sage

Hey @naemea 

sorry, I don't really understand your question or what is not working. You have a SharePoint table (list?) and you want to send approvals using Power Automate for each row in the table (list)? 

Did you already tried to build it in Power Automate, so that you can maybe show what you already tried?

 

Every hint would be helpful, that we can help you!

 

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

Hi,

 

I have a SharePoint list, with 4 multi-line text fields which are evenly compiled.

 

I'm sending approvals with PowerAutomate and I want to send a table in markdown with those 4 fields.

 

Right now, my approval looks like this:

 

naemea_1-1635234119529.png

 

I'd like it to be a table for better reviewing, like this:

 

PRODUCTPRICE APRICE BOFFER

A

B

C

1

2

3

4

5

6

D

E

F

 

I've tried to append the fields into a variable, but it works only when every field has 1 item, because I couldn't split the multiple lines of text into separate rows. That's how it looks:

 

naemea_2-1635234290402.png

 

This is what I tried to to do in PowerAutomate:

 

naemea_3-1635234405146.png

 

naemea_4-1635234487112.png

 

I think I need a further loop to split the columns into rows, but I've not managed to do so. 

 

I hope I've given you a better understanding of the problem. Again, thanks for you time and let me know if I can provide further details.

v-xiaochen-msft
Community Support
Community Support

Hi @naemea ,

 

The point is to use markdown in your approval detail.

vxiaochenmsft_0-1635326210046.png

https://docs.microsoft.com/en-us/power-automate/approvals-markdown-support 

 

I did a test for you.

This is my list.

vxiaochenmsft_1-1635326247510.png

This is my flow.

vxiaochenmsft_2-1635326278414.png

vxiaochenmsft_3-1635326292665.png

vxiaochenmsft_5-1635326508118.png

 

vxiaochenmsft_4-1635326450591.png

concat('|',items('Apply_to_each').Title,'|',items('Apply_to_each').Email,'|')

 

vxiaochenmsft_6-1635326524192.png

vxiaochenmsft_7-1635326554489.png

 

Best Regards,

Wearsky

 

 

Hi @v-xiaochen-msft,

 

Thanks for your answer. I've managed to obtain your same result when there is only one line for each field. My problem is that my items' fields are not single lines of text but multiple lines separated by line breaks ("\n" character). The table is related to one SharePoint item only which can contain multiple lines of text in 4 even fields.

 

IE:

 

ITEM IDPRODUCTPRICE APRICE BOFFER

1

A

B

C

1

2

3

4

5

6

D

E

F

 

I don't know if I've managed to explain myself better than before. Please let me know if I was unclear again.

 

Thanks

v-xiaochen-msft
Community Support
Community Support

Hi @naemea ,

 

I understood your needs and reproduced your problem.

Unfortunately, the markdown table itself does not support line breaks.

I have seen some blogs introducing the use of "<br>" in markdown table.

But unfortunately, Html is not supported in the approval details.

vxiaochenmsft_0-1635387497003.png

vxiaochenmsft_1-1635387509588.png

 

So I think maybe you can only convert your multi-line text into single-line text.

 

Best Regards,

Wearsky

 

 

Hi @v-xiaochen-msft,

 

I'll try to check out those blogs as well, thanks for the heads up.

 

Unfortunately I can't convert those fields in single-line text. Do you think that a loop which breaks the array with a "split" function and then re-concatenate the 4 columns into rows is achievable?

v-xiaochen-msft
Community Support
Community Support

Hi @naemea ,

 

Yes, I think so. 

I will make a demo for you later.

 

Best Regards,

Wearsky

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,934)