cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Help Remove Specific String from Sharepoint List

Short version:

How do I remove set a variable equal to "0001" and remove the variable from this label text: "0001, 0002, 0003"

 

Long version: 

I'm working on building a simple inventory system. The inventory items have two specific ID numbers, both of which need to be maintained together to be roughly: "IDnumber1.IDnumber2"

 

The database has a number of locations in which the inventory can be stored and the inventory can be split up. So, for example, one ID#1.ID#2 can be applied to four locations and each location can have four ID numbers applied to it. 

 

What I'm trying to do is use concat, ismatch, or whatever combination of functions I need so that if someone removes an ID.ID number from a location, I would search for the current string of ID numbers and remove ONLY that license.id from that sharepoint list column. 

 

If I had a label that equaled "0001, 0002, 0003", how would I use concat/ismatch to remove only "0002" from the equation? In addition, is there a way I can set the formula to look for a variable instead of a specific text?

 

E.g. Concat(Filter(Split(Label21.Text,""),IsMatch(Result, ExampleVariable)),Result)

 

Right now the above function does not work regardless of how I try to call 'examplevariable', however if I replace it with "0001" it works, and if I replace it with "0002" it does not work. Would i also need to use a sort function to look through more than just the first entry?

 

obviously, I'm a little lost in this. Any help is appreciated. 

 

DB is setup to have only two columns, one for location and one for the license.id numbers. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Help Remove Specific String from Sharepoint List

Hi @PDG ,

Based on the formula you provided, I think there is something wrong with it. The second argument of the IsMatch function must be a TextFommat enum or a regular expression (constant values), it could not be variable value.

 

So within the second argument of the IsMatch function, you could not place a variable. Please consider modify your formula as below:3.JPG
Please take a try with the following formula:

Concat(
Filter(Split(Label21.Text, " "), !StartsWith(Result, ExampleVariable)),
Result & " "
)

In addition, I think the Substitute function could also achieve your needs. Please also take a try with the following formula:

Substitute(Label21.Text, "0002, ", "")

Please take a try with above solution, 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

2 REPLIES 2
Highlighted
Dual Super User
Dual Super User

Re: Help Remove Specific String from Sharepoint List

Hi @PDG 

 

looking at the short story only 🙂

Substitute("0001,0002,0003","0002","")

 

Use substitue function and replace the text with empty string

Highlighted
Community Support
Community Support

Re: Help Remove Specific String from Sharepoint List

Hi @PDG ,

Based on the formula you provided, I think there is something wrong with it. The second argument of the IsMatch function must be a TextFommat enum or a regular expression (constant values), it could not be variable value.

 

So within the second argument of the IsMatch function, you could not place a variable. Please consider modify your formula as below:3.JPG
Please take a try with the following formula:

Concat(
Filter(Split(Label21.Text, " "), !StartsWith(Result, ExampleVariable)),
Result & " "
)

In addition, I think the Substitute function could also achieve your needs. Please also take a try with the following formula:

Substitute(Label21.Text, "0002, ", "")

Please take a try with above solution, 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

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,986)