cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVTS
Post Patron
Post Patron

Character Split from first to last - Canvas App

Team,

 

I would like to split two types of string from following number.

 

10141400000231212
 
Requirement 1 :
 
First 8 digit.
 
Requirement 2 :
 
Last 6 Digit
 
Current formula.
 
For first req :
(Last(FirstN(Split(TextInput6.Text, "000"),1)).Result)
For Second req :
 
With({_dt: Last(FirstN(Split(TextInput6.Text, "000"),2)).Result },
Date(2000 + Value(Right(_dt, 2)), Value(Mid(_dt, 3, 2)), Value(Left(_dt, 2)))
)
 
Issue i am facing with above code is if suppose 000 is coming in first 8 digit then only first 6 characters are coming.
Example : 101414
 
Expected : 10141400
 
same issue happening in last 8 digit also.
 
 
2 ACCEPTED SOLUTIONS

Accepted Solutions
TheRobRush
Super User
Super User

 

Try using Left/Right function

Left(TextInput6.Text,8)

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

View solution in original post

rubin_boer
Super User
Super User

hi @AVTS 

Req 1: Left("10141400000231212",8)

Req 2: Right("10141400000231212",6)

 

replace the string with the control, e.g. Right(TextInput6.Text,6)

 

View solution in original post

3 REPLIES 3
TheRobRush
Super User
Super User

 

Try using Left/Right function

Left(TextInput6.Text,8)

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

View solution in original post

rubin_boer
Super User
Super User

hi @AVTS 

Req 1: Left("10141400000231212",8)

Req 2: Right("10141400000231212",6)

 

replace the string with the control, e.g. Right(TextInput6.Text,6)

 

View solution in original post

AVTS
Post Patron
Post Patron

It worked thank you for both your direction with solution.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,173)