web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / how to remove special ...
Power Apps
Answered

how to remove special character in column?

(1) ShareShare
ReportReport
Posted on by 32

Hi,

 I need a help to remove parons in the table column values .So, I can compare with the entered values that will be columns values opposite it will be without parons.

 

the column shown below:-

msireesha_0-1679395880929.png

 

the input will be 

01008490440417361717083110BAN226DC--->the value show in image

 

It would helpful .If you give me suggestion

@timl 

 

Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    I have a blog post here about a way to remove/allow certain characters in strings using RegEx:

     

    Remove characters from strings using Regex in Power Apps - iAm_ManCat Blog (iammancat.dev)

     

     

  • KRider Profile Picture
    577 Super User 2024 Season 1 on at

    Ok, so here is one way but one of our pro's may have an easier solution. The number in quotes should point to the number you are trying to "Clean"

    Mid("(01)00849044041736(17)170831(10)BAN226DC",2,2)&
    Mid("(01)00849044041736(17)170831(10)BAN226DC",5,14)&
    Mid("(01)00849044041736(17)170831(10)BAN226DC",20,2)&
    Mid("(01)00849044041736(17)170831(10)BAN226DC",23,6)&
    Mid("(01)00849044041736(17)170831(10)BAN226DC",30,2)&
    Mid("(01)00849044041736(17)170831(10)BAN226DC",33,8)
  • msireesha Profile Picture
    32 on at

    Hi @iAm_ManCat ,

    Thanks for your suggestion but the regex you suggested is to label.

    I have tried this in below image.

    msireesha_0-1679459885616.png

    It is column name in the table so it show red line.
    can you give another suggestion.

     

  • msireesha Profile Picture
    32 on at

    Hi @KRider ,

    your suggestion of this way will be usefull.

    But the parons may vary in the position.

     

    for example,

    msireesha_1-1679460291623.png

     

  • Verified answer
    iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    Hi @msireesha 

     

    You would need to adapt the code to your needs - what exactly are you trying to do - what I suggested is to replace the label/column that displays the value with this code that removes the characters.

     

    I'm unsure about your use of setting a variable here, what was the intended purpose? It looks like you are scanning a barcode, but then in your code you are trying to compare whether the scanned barcode value is the same as the cleaned version from the lookup, so your searcitem would end up being a true/false value, not a lookup..

     

    If I were doing this myself I would just change that LookUp you are doing because you are comparing the clean string to the existing value which won't complete a lookup - you need to add a column temporarily to the datasource using the AddColumns function to create a new clean barcode to check, like this:

     

    Set(
     searcitem,
     LookUp(
     AddColumns(
     'GLOBUS_APP.T2550_PART_CONTROL_NUMBER',
     "cleanBarcode",
     Concat(
     Split(
     C2550_UDI_HRF,
     ""
     ),
     If(
     IsMatch(
     Value,
     "[A-Za-z0-9]"
     ),
     Value
     )
     )
     ),
     cleanBarcode = BarcodeScanner2.Text
     )
    )

    image.png

     

  • timl Profile Picture
    36,411 Super User 2025 Season 2 on at

    @msireesha - thanks for tagging me. Hopefully, @iAm_ManCat's  excellent reply above answers your question.

  • msireesha Profile Picture
    32 on at

    This is the solution I try to do.

    @iAm_ManCat Thanks a lot.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard