cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Working with strings in Power Apps

Hi All,

 

Is there a way i can get the middle part of a string by removing the first n and last m characters, where the size of the string will be dynamic and not static.

 

For eg: My string is 

[{"Url":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjIAAAFKCAYAAAAHVbVoAAAgAElEQVR4Xu3dCax8V10H8K8tLYuIyGJBFsviQhEkoEARFQUBxaXaIAQR4xaMILgQFReEiBESIopERIx7XHHDBRBFDFgEBREsooJIxILsBVkFNce+v7xO582ceTNn5px7P5MYoz1zzu98fnfmff93Zu79mHgQIECAAAECBAYV+JhB61Y2AQIECBAgQCCCjIOAAAECBAgQGFZAkBm2dQonQIAAAQIEBBnHAAECBAgQIDCsgCAzbOsUToAAAQIECAgyjgECBAgQIEBgWAFBZtjWKZwAAQIECBAQZBwDBAgQIECAwLACgsywrVM4AQIECBAgIMg4BggQIECAAIFhBQSZYVuncAIECBAgQECQcQwQIECAAAECwwoIMsO2TuEECBAgQICAIOMYIECAAAECBIYVEGSGbZ3CCRAgQIAAAUHGMUCAAAECBAgMKyDIDNs6hRMgQIAAAQKCjGOAAAECBAgQGFZAkBm2dQonQIAAAQIEBBnHAAECBAgQIDCsgCAzbOsUToAAAQIECAgyjgECBAgQIEBgWAFBZtjWKZwAAQIECBAQZBwDBAgQIECAwLACgsywrVM4AQIECBAgIMg4BggQIECAAIFhBQSZYVuncAIECBAgQECQcQwQIECAAAECwwoIMsO2TuEECBAgQICAIOMYIECAA"}]

I want to remove the first 9 characters and last 3 characters and save the rest of the string.

 

Any help will be appreciated.

 

Regards

Srinath
 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Working with strings in Power Apps

Hi @Srinath Try

UpdateContext({vNewString,<YourString>})
UpdateContext({vNewString,Mid(vNewString,10,Len(vNewstring)-12)})

Please excuse if I have not got the mathematics quite right, but you are extracting from the 10th character for a length of 12 less than the string length.

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

1 REPLY 1
Highlighted
Community Champion
Community Champion

Re: Working with strings in Power Apps

Hi @Srinath Try

UpdateContext({vNewString,<YourString>})
UpdateContext({vNewString,Mid(vNewString,10,Len(vNewstring)-12)})

Please excuse if I have not got the mathematics quite right, but you are extracting from the 10th character for a length of 12 less than the string length.

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

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

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