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

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
Highlighted
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
Highlighted
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

Highlighted
Helper V
Helper V

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

Highlighted
Helper V
Helper V

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!

Highlighted
Helper V
Helper V

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

Highlighted
Helper V
Helper V

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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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