cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Srinath 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
WarrenBelz 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
WarrenBelz 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

Community User Group Member Badges

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

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,514)