cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Dual Super User II
Dual Super User II

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 II
Dual Super User II

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

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

@RezaDorrani 

 

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

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

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

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 (4,492)