Skip to main content
Community site session details

Community site session details

Session Id : pi4pPAytV7Y1QK01HprauL
Power Apps - Building Power Apps
Answered

Help Remove Specific String from Sharepoint List

Like (0) ShareShare
ReportReport
Posted on 12 Sep 2019 16:25:13 by 14

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. 

  • Verified answer
    v-xida-msft Profile Picture
    on 13 Sep 2019 at 06:18:26
    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,

  • RezaDorrani Profile Picture
    12,141 on 13 Sep 2019 at 00:20:30
    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

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Loading complete