web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Duplicate Request ID
Power Apps
Unanswered

Duplicate Request ID

(0) ShareShare
ReportReport
Posted on by 79

Hello,

 

I have an issue where I am creating duplicate request ID

 

In the Onvisible of the request screen the RequestID is set by reading the list and taking the RequestID item value from the last submitted item.

 

 

 

If(
 frmRequestDetails.Mode = FormMode.New,
 "REQ" & First(
 Sort(
 AddColumns(
 'Freight Requests',
 "NewRequestID",
 Trim(
 Substitute(
 RequestID,
 "REQ",
 ""
 )
 ) * 1
 ),
 NewRequestID,
 Descending
 )
 ).NewRequestID + 1,
 Parent.Default
)

 

 

 

I then increment the Request ID + 1  

 

It seems that following the SubmitForm there is quite a delay in the time that the item is written to the list and the user navigating back to submit a second request which results in the item not being present in the list. This then results in the the new request generating the same Request ID.

 

Can anyone help?

Many Thanks

Categories:
I have the same question (0)
  • DDM Profile Picture
    79 on at

    So its not PowerApps after all.

     

    It's simply down to the fact that the- SharePoint list does not refresh after the item is added. I need to hit the F5 refresh a couple of times before the item is shown. Not an optimal solution.

     

    Why the SharePoint list not automatically updating... - Power Platform Community (microsoft.com)

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @DDM could you explain in more detail what the issue is? How do you Navigate to your request screen? After SubmitForm().....or within the OnSuccess property of the form. 

     

    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.

  • Verified answer
    DDM Profile Picture
    79 on at

    Hi @PowerRanger 

     

    Thanks for coming back to me.

     

    I solved it another way. Essentially, I was never going to achieve what I needed to achieve doing it the way I was doing it and so I took the path of least resistance....

     

    UpdateContext({RequestID: "REQ" & Text(Now(),"[$-en-US]yymmddhhmmss")})

     

    I still get my Unique RequestID and I am not having to worry about ensuring the list is updated to ensure contiguous numbering.

     

    I was having to hit refresh on the SharePoint list twice for the new item to appear.  Very Bizarre!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 759 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 310 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 228

Last 30 days Overall leaderboard