cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Data Field Changing value on navigating screen

Hello Expert,

 

In my App i have one drop down field name EmployePersonnelNumber , This filed picks data from SQL and then save in Share point list. but for the numbers stating with 0 , it discards all the zero and saves only the remaining number for example if personnel Number is coming from SQL in dropdown as 0003 , it will become 3 on the next screen.

 

 i tried changing the datacard value format from text to number and number to text but no effect. please advise i ll be very grateful.

Please find the screen shot below. the data type of SQL column is "single Text of Line"

Screen 1. when choosing the number by dropdown.

   Capture108.PNG

Screen 1. navigating to the next screen 

Capture109.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
C-Papa
Super User
Super User

Hi, where the value is 3, try changing the default property to

 

Text([YourNumber],"0000") where [YourNumber] is the same as the current default, most likely Parent.Default

View solution in original post

19 REPLIES 19
C-Papa
Super User
Super User

Hi, where the value is 3, try changing the default property to

 

Text([YourNumber],"0000") where [YourNumber] is the same as the current default, most likely Parent.Default

View solution in original post

RandyHayes
Super User
Super User

@Anonymous 

What is the column type in your SharePoint list?  It will need to also be single line of text as your SQL is.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Anonymous
Not applicable

Hii @RandyHayes , It is single line of text.

RandyHayes
Super User
Super User

@Anonymous 

What is your Default property (assuming this is a Dropdown - DefaultSelectedItems property if a combobox), and the Items property?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Anonymous
Not applicable

Hello @C-Papa , I believe this will append the "0000" text always before the personnelNumber. so in this case if next personnel number will be 0195 it will make it 0000195. which will be wrong value for the record.

correct me if i am wrong 

It will not do what you have suggested, give it a try

 

example below:

 

C-Papa_0-1621863438719.png

 

Anonymous
Not applicable

@RandyHayes , this is a drop down.

Please see below.

1. Default property of dropdown is      "1"

2.Item property of drop down is 

Distinct( Filter(
   BG_EmpnameTimesheet,
   NAME=Dropdown3.Selected.Result
),PERSONNELNUMBER).Result

Default property of whole datacard is : ThisItem.EmployePersonnelNumber

RandyHayes
Super User
Super User

@Anonymous 

Your Default should be : Parent.Default in order to see the value stored in your SharePoint record when editing.

 

However, with the formula you have on the Items property - are you actually getting 0195 (for example) or 195?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Anonymous
Not applicable

Hey @C-Papa , This is working good for me. Thank you so much for the help.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,220)