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

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
Impactful Individual
Impactful Individual

 

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
Impactful Individual
Impactful Individual

 

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
Helper V
Helper V

It worked thank you for both your direction with solution.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,576)