cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVTS
Super User
Super User

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)

 

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.

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!
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)

 

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.
AVTS
Super User
Super User

It worked thank you for both your direction with solution.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,509)