cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
techtudoor
Resolver I
Resolver I

SharePoint ID not populating in ticket number field

I am building a PowerApp for a ticketing system. My main landing screen is similar to a EULA screen where users attest to the terms and conditions.

 

I have set my PowerApp to submit the Yes I agree field (via checkbox) to a SharePoint List on a button click. Then my app goes to the next screen where users input their requests. The second screen has a  Request Number field ("REQ" &Year(Now()) &"-" &ThisItem.ID).

 

I have the form on the second screen Item property set to (Form1.LastSubmit). I can see the SharePoint ID in the list, but the field on the second screens form does not show the ID. How can I get the request field to pull the SharePoint ID when it loads?

 

It would be very beneficial to show the Request number so the user can see the request number. 

 

Suggestions greatly appreciated. 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @techtudoor , 

Is there a Edit form (Form1) existed in your first screen to save the Yes I agree field value (via checkbox) to a SharePoint List?

Have you reset your Form1 after you submit your Form1 data?

 

Based on the issue that you mentioned, I think this issue may be related to the Form1.LastSubmit formula you typed within the Item property of the second Edit form.

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnSuccess property of the Form1 to following:

Set(SubmittedRecord, Form1.LastSubmit);   // Add this formula
Navigate(SecondScreen)

Within the second screen, set the Item property of the Edit form to following:

SubmittedRecord

then try the following formula within the Default property of the Request Number Text Box:

"REQ" &Year(Now()) & "-" & ThisItem.ID

or

"REQ" &Year(Now()) & "-" & SubmittedRecord.ID

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @techtudoor ,

A bit unusual, I assume that 

("REQ" &Year(Now()) &"-" &ThisItem.ID)

is the Default of the field?

This may not work, but try at Screen OnVisible

Reset(YourRequestNumberControl)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

v-xida-msft
Community Support
Community Support

Hi @techtudoor , 

Is there a Edit form (Form1) existed in your first screen to save the Yes I agree field value (via checkbox) to a SharePoint List?

Have you reset your Form1 after you submit your Form1 data?

 

Based on the issue that you mentioned, I think this issue may be related to the Form1.LastSubmit formula you typed within the Item property of the second Edit form.

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnSuccess property of the Form1 to following:

Set(SubmittedRecord, Form1.LastSubmit);   // Add this formula
Navigate(SecondScreen)

Within the second screen, set the Item property of the Edit form to following:

SubmittedRecord

then try the following formula within the Default property of the Request Number Text Box:

"REQ" &Year(Now()) & "-" & ThisItem.ID

or

"REQ" &Year(Now()) & "-" & SubmittedRecord.ID

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msft , using SubmittedRecord.ID worked great.

 

Thank you

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,735)