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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Delegation Warning on ...
Power Apps
Unanswered

Delegation Warning on Max Operation is not Supported by this Connector

(0) ShareShare
ReportReport
Posted on by 6

Hi all.. i'm newbie with Power Apps. My code is working correctly. But, there was "Delegation warning the highlighted part of this formula might not work correctly. The "Max" operation is not supported by this connector.". Can you solving this. Thanks!

If(
Form2.ValidSubmitForm(Form2);

Set
LastTicketMax('DLFA - Ticketing', Value(Mid('Nomor Tiket', 3, Len('Nomor Tiket') - 2)))
);

Set(NewTicketNumber, If(IsBlank(LastTicket) || LastTicket = 0, 1, LastTicket + 1));
Set(CustomTicketNumber, Concatenate("T-", Text(NewTicketNumber, "[$-en-US]0000")));

Set(
RecordToUpdateLookUp('DLFA - Ticketing', ID = Form2.LastSubmit.ID)
);

Patch(
'DLFA - Ticketing'RecordToUpdate,
{
'Nomor Tiket': CustomTicketNumber
}
);

ResetForm(Form2);
Set(varShowPopUp, true);
Refresh('DLFA - Ticketing')
)
Categories:
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @rifaldyt 

     

    can you try this:

    If(
     Form2.Valid, 
     SubmitForm(Form2);
    
     
     ClearCollect(
     TopTickets,
     FirstN(
     Sort('DLFA - Ticketing', Value(Mid('Nomor Tiket', 3, Len('Nomor Tiket') - 2)), Descending),
     2000 // Adjust this number based on your dataset size and performance considerations
     )
     );
    
     
     Set( 
     LastTicket, 
     Max(TopTickets, Value(Mid('Nomor Tiket', 3, Len('Nomor Tiket') - 2)))
     );
    
     
     Set(NewTicketNumber, If(IsBlank(LastTicket) || LastTicket = 0, 1, LastTicket + 1));
     Set(CustomTicketNumber, Concatenate("T-", Text(NewTicketNumber, "[$-en-US]0000")));
    
     // Step 4: Update the record
     Set(
     RecordToUpdate, 
     LookUp('DLFA - Ticketing', ID = Form2.LastSubmit.ID)
     );
    
     Patch(
     'DLFA - Ticketing', 
     RecordToUpdate,
     {
     'Nomor Tiket': CustomTicketNumber
     }
     );
    
     
     ResetForm(Form2);
     Set(varShowPopUp, true);
     Refresh('DLFA - Ticketing')
    )
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • rifaldyt Profile Picture
    6 on at

    thank u @mmbr1606 for ur fast answer. But this code has error on Short function 😞

  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    which error do u recieve?

  • rifaldyt Profile Picture
    6 on at

    sorry for late reply. i capture the error on image belowScreenshot 2024-05-28 at 07.49.14.pngScreenshot 2024-05-28 at 07.49.21.png

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard