cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zeuslyone
Level: Powered On

Using mid and find with addcolumns to parse information

Hello,

I'm trying to create a column in a data table that will parse a substring from another column's string value, so I'm using AddColumns and Mid with a couple Find functions added to do this. I've done this kind of thing many times in Excel and Power BI, but I'm hitting a wall in trying to do it here. 

Here's my code:
AddColumns('Project Dashboard Creation (Test)', "Action", Mid(Description_Column1.Text, Find("Action:", Description_Column1.Text), (Find("Result:", Description_Column1.Text) - Find("Action", Description_Column1.Text))))

My test table is pulled from a SharePoint list with one test entry. The value in the field that should be parsed is (note -- editted out a couple html tags that shouldn't matter for this exercise but were breaking the post): 
Testing Flow with Azure DevOps and SharePoint ListTime to Test The Description!!! Action: Capture these words of wisdom Result: Success/Failure???

The mid function in the AddColumns then looks for that "Action:" in the Description column and should return the value from there to "Result:". However, when I do this, despite getting no error messages about the syntax, I get no return value, just a blank box.

Does anyone have any insight about what I'm doing wrong here? I'm pretty new to PowerApps, so I'm sure I'm misunderstanding something about how these functions are utilized.

Thanks for any help!
Z

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Using mid and find with addcolumns to parse information

Hi @zeuslyone ,

Do you want to extract the sub text string value from the Description column in your SP list?

 

Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please consider modify your formula as below (set the Items property of the Data table to following😞

AddColumns(
'Project Dashboard Creation (Test)',
"Action",
Mid(
Description, /* <-- Please type Description column (from your SP List) here rather than the column name value in your Data Table (e.g. Description_Column1.Text)*/
Find("Action:", Description),
Find("Result:", Description) - Find("Action", Description)
)
)

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Using mid and find with addcolumns to parse information

Hi @zeuslyone 

 

Try this

 

AddColumns('Project Dashboard Creation (Test)', "Action", Mid(Description_Column1, Find("Action:", Description_Column1), (Find("Result:", Description_Column1) - Find("Action", Description_Column1))))

 

Description_Column1 - is the name of the column which contains the value

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Community Support Team
Community Support Team

Re: Using mid and find with addcolumns to parse information

Hi @zeuslyone ,

Do you want to extract the sub text string value from the Description column in your SP list?

 

Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please consider modify your formula as below (set the Items property of the Data table to following😞

AddColumns(
'Project Dashboard Creation (Test)',
"Action",
Mid(
Description, /* <-- Please type Description column (from your SP List) here rather than the column name value in your Data Table (e.g. Description_Column1.Text)*/
Find("Action:", Description),
Find("Result:", Description) - Find("Action", Description)
)
)

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

zeuslyone
Level: Powered On

Re: Using mid and find with addcolumns to parse information

Thank you, @v-xida-msft ! That did the trick!!! Could you possibly explain why Description is different than the column name option? That would be helpful for my understanding.

zeuslyone
Level: Powered On

Re: Using mid and find with addcolumns to parse information

Thank you @RezaDorrani ! It didn't solve the issue, but I appreciate the help.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,331)