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
Solved! Go to Solution.
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,
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
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,
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.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
197 | |
67 | |
46 | |
41 | |
28 |
User | Count |
---|---|
254 | |
121 | |
84 | |
80 | |
73 |