cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Unique Identifier, static date

HI,

 

Got a sharepoint form customised with powerapps, trying to create a unique identifier using:

First 3 letters of a field 

Date (YYMMDDHHMMSS)

First and Last name inittials of submitter

 

The problem is that the date is not static (changes as fields are updated or when item is edited) also when someone edits the form the initials drop off... 

 

any help to keep those fields static as soon as it is created would be great! Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Frequent Visitor

hi ,  you can make the card's UPDATE property different based on formmode,  if the formmode is new, you can make update the text information , if it's changing or updating , set the update property to false, then it will not be changed .

If ( SharePointForm.Mode=FormMode.New, DataCardValue.Text,false)

 

hope that can help you.

 

I've tested on my sharepoint form ,it  turns out that false goes to nonsense, but I try another way it goes correctly,

1st step  set the sharepoint integration's onedit property:

Set(vartime,Label1.Text); EditForm(SharePointForm1)

which means if you're editing information, it well at first set the time related text to a variable,

1st.png

2nd step:

the label that contains the time related text ,set the text property below:

If(SharePointForm1.Mode=FormMode.New, Text(Now(),"[$-en-US]yymmddhhmmss"),vartime)

2nd.png

that means if the formmode is edit ,then it will stay the originally text unchanged.

View solution in original post

1 REPLY 1
Frequent Visitor

hi ,  you can make the card's UPDATE property different based on formmode,  if the formmode is new, you can make update the text information , if it's changing or updating , set the update property to false, then it will not be changed .

If ( SharePointForm.Mode=FormMode.New, DataCardValue.Text,false)

 

hope that can help you.

 

I've tested on my sharepoint form ,it  turns out that false goes to nonsense, but I try another way it goes correctly,

1st step  set the sharepoint integration's onedit property:

Set(vartime,Label1.Text); EditForm(SharePointForm1)

which means if you're editing information, it well at first set the time related text to a variable,

1st.png

2nd step:

the label that contains the time related text ,set the text property below:

If(SharePointForm1.Mode=FormMode.New, Text(Now(),"[$-en-US]yymmddhhmmss"),vartime)

2nd.png

that means if the formmode is edit ,then it will stay the originally text unchanged.

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,421)