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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Remove a letter if a c...
Power Apps
Answered

Remove a letter if a column contains specific selection

(0) ShareShare
ReportReport
Posted on by 2,567

Hi

 

I have created a powerapp where i use the scan QR code function. Now the text string i get from the QR scanning contains the letter "S" in the start. I want to remove this "S" But i only want to remove the "S" if my column named "Vendor" = Apple

Categories:
  • Edwin-Abdalian Profile Picture
    641 on at

    to remove the "S", you can use Right(QR.Text,Len(QR.Text) - 1)

    Do you want to patch and fix the data? or you have a Gallery which you display the QRtext?

    if you want to patch then just filter the items to "Vendor" = Apple, and if you have a gallery, set the text to If(thisItem.Vendor = Apple, Right(QR.Text,Len(QR.Text) - 1))

  • JimmyW Profile Picture
    2,567 on at

    @Edwin-Abdalian Thank you for answering Edwin.

     

    Im not getting this to work.

    Im not sure if it's because my Vendor column actually filters another list and displays items from that list to be selected.

    I get a invalid argument at the = sign.

    If(VendorData =

    If(VendorData.SelectedText.Value =

     

    Nothing really works as it says = is invalid

     

     

     

  • JimmyW Profile Picture
    2,567 on at

    @Edwin-Abdalian 

     

    If(VendorData.Selected.Result = "Apple", Right(BarcodeScanner2.Text,Len(BarcodeScanner2.Text) - 1))

    What happens is that it will never display the input from the scanner in text it will display the name of the BarcodeScanner button.

     

    What i need to display is the data from the QR scanner and remove the S only if VendorData is Apple if it's not Apple show all data from the QR scanner

  • JimmyW Profile Picture
    2,567 on at

    @Edwin-Abdalian 

     

    If(VendorData.Selected.Result = "Apple", Right(varSerialNumber, Len(varSerialNumber) - 1))

    This works correct.

    The only issue i have is it wont display anything if i select another vendor now, then the field will be blank because it will only be visible if Apple is selected.

  • Verified answer
    Edwin-Abdalian Profile Picture
    641 on at

    you haven't specified anything for the ELSE section of your if statement

    If(VendorData.Selected.Result = "Apple", Right(varSerialNumber, Len(varSerialNumber) - 1), Else)

     What do you display if VendorData.Selected.Result = "Apple" is not true?

     

    If(VendorData.Selected.Result = "Apple", Right(varSerialNumber, Len(varSerialNumber) - 1), varSerialNumber)

    --------------------------------------------------------------------

    Please Accept as Solution if this post answered your question so other members can find it. If you found this post helpful consider giving my post a Thumbs Up!

     

  • JimmyW Profile Picture
    2,567 on at

    @Edwin-Abdalian Thank you, i dont know why i missed that really hehe 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard