cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Srinath
Level: Powered On

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
WarrenBelz
Level 8

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
WarrenBelz
Level 8

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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,616)