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 / No Delegation Warnings...
Power Apps
Unanswered

No Delegation Warnings, getting bad data

(0) ShareShare
ReportReport
Posted on by 98

This was working, up until a few days ago.  The entries in the table recently exceeded 4k but, since I'm not getting any delegation warnings anywhere, I thought I'd be okay. I'm using dataverse to store my data.  Here's the code in question.

If(
 DataCardValue25.Text in HarvestTickets.HVTTicketNumber,
 UpdateContext({contVis: true}),
 SubmitForm(Form3_1) && Navigate('Harvest Ticket')
);

 The DataCardValue25.Text, when submitted, goes to the HVTTicketNumber column.  What this code is supposed to be doing is checking if the entered ticket number (they're all supposed to be unique values) matches a record in the table.  If it does, it displays a pop up to the user letting them know that if they proceed they'll overwrite preexisting data.  They can then decide if they want to proceed. And then the else statement just submits the record since it's not a duplicate. 

 

Like I said, this WAS working a week or two ago when the data in the table was lower.  Now it completely bypasses the If() statement conditions and just goes ahead and submits it.  This is resulting in a few instances of duplicate data.  

 

Any ideas would be greatly appreciated.  Thank you!

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @JMerk 

    Your formula in general has some issues with it as you are trying to compare text to a table and are using the in operator to check.  This will present issues with large data sets.

    Also, you are trying to navigate after the form sumbit...but how do you know it was a success??  If it fails, your users will be navigated away before being offered a chance to correct.

     

    Please consider changing your Formula to the following:

    If(
     LookUp(HarvestTickets, 
     HVTTicketNumber = DataCardValue25.Text,
     true
     ),
     UpdateContext({contVis: true}),
    
     SubmitForm(Form3_1) 
    );

     

    And in your OnSuccess action of the form, add the following:

    Navigate('Harvest Ticket')

     

    One final thing...&& is a boolean and operator.  SubmitForm returns no value, neither does Navigate, so there is nothing to "and" together.

    What you want is the function Chaining operator - so it would have been: SubmitForm(Form3_1); Navigate('Harvest Ticket')

    But, that particular navigate after submit should always be avoided give what I mentioned above.

     

    I hope this is helpful for you.

  • JMerk Profile Picture
    98 on at

    You're the best. Thanks so much!

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @JMerk 

    Happy to help!! 😁

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard