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

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
Super User
Super User

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
Super User
Super User

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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,658)