cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cchan000
Level: Powered On

created a unique ID that saves in Sharepoint, but doesn't display when opened again in Powerapps.

hi. i have two data cards. one is "Title", one is "Asset ID"

 

Once someone adds something to title, the asset ID automatically generateds a unique ID based on Time.

 

in the OnChange property for the Title field:

 

Set(uniqueIDAsset1,"XVOD"&Text(Now(),"[$-en-US]yyyymmddhhmmss")&"00"); 

 

in the Default property for the Asset ID field:

 

uniqueIDAsset1

 

This form works and saves the generated IDs to SHAREPOINT, BUT when I open the form up, it doesn't display in the Asset ID box in powerapps. Here are screenshots.

 

asset IDs in sharepoint saved:

b.png

when opening the saved form, doesn't show anythign in Asset ID 1 field:

 

a.png

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: created a unique ID that saves in Sharepoint, but doesn't display when opened again in Powerapps.

Hi @cchan000 

 

Do not do the onchange thing

 

First remove the unqiue id data card adn then re-add it

Next  - On the Unqiue ID data card default property do the following

If(FormName.Mode = FormMode.New, "XVOD"&Text(Now(),"[$-en-US]yyyymmddhhmmss")&"00", ThisItem.UniqueID)

 

 

FormName = repalce with name of ur form control

 

ThisItem.UniqueID - make sure UniqueID is the name of ur column

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: created a unique ID that saves in Sharepoint, but doesn't display when opened again in Powerapps.

Hi @cchan000 

 

Do not do the onchange thing

 

First remove the unqiue id data card adn then re-add it

Next  - On the Unqiue ID data card default property do the following

If(FormName.Mode = FormMode.New, "XVOD"&Text(Now(),"[$-en-US]yyyymmddhhmmss")&"00", ThisItem.UniqueID)

 

 

FormName = repalce with name of ur form control

 

ThisItem.UniqueID - make sure UniqueID is the name of ur column

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

cchan000
Level: Powered On

Re: created a unique ID that saves in Sharepoint, but doesn't display when opened again in Powerapps.

thank you very much for the reply. a few quick questions (easy).

 

when you say change the default data card property, do you mean the actual parent data card or the data card value?

 

the form control based on this screenshot is "SharePointForm1" correct?

 

Screen Shot 2019-10-10 at 3.47.49 PM.png

 

the unique ID column is "AssetID1" correct?

 

Screen Shot 2019-10-10 at 3.48.12 PM.png

 

with the above both being true, then the formula is:

 

If(SharePointForm1.Mode = FormMode.New, "XVOD"&Text(Now(),"[$-en-US]yyyymmddhhmmss")&"00", ThisItem.AssetID1); 

cchan000
Level: Powered On

Re: created a unique ID that saves in Sharepoint, but doesn't display when opened again in Powerapps.

@RezaDorrani 

 

hi! can you help assist with the above, thanks!

cchan000
Level: Powered On

Re: created a unique ID that saves in Sharepoint, but doesn't display when opened again in Powerapps.

hi. i put the formula in there. but get ONE error. can you assist?

 

Screen Shot 2019-10-13 at 10.09.07 AM.png

cchan000
Level: Powered On

Re: created a unique ID that saves in Sharepoint, but doesn't display when opened again in Powerapps.

figured it out! was just removing the semicolon. thank you tho the rest worked.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,165)