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 / Autoincrement a code i...
Power Apps
Answered

Autoincrement a code in my form

(0) ShareShare
ReportReport
Posted on by 40

hello Everybody , 

 

I want to autoincrement my code in my from once I submit it , 

ALANAH22_0-1648501304037.png

i want that once i submit my form the next value for my hierarchies code =5 , I've used 2 functions but it not working , i have the same hierarchies code=4 in 2 records (which is wrong)

in my datacardvalue10 :  If(EditForm3.Mode = FormMode.New;Last(MDM_Hierarchie).HierarchieCode + 1;

ThisItem.HierarchieCode)

button submit :   Refresh(MDM_Hierarchie);;NewForm(EditForm3);; SubmitForm(EditForm3);; Navigate(BrowseHierarchyLvl)

 

 

any help?

Categories:
I have the same question (0)
  • Verified answer
    EdViegas Profile Picture
    436 on at

    Try...

    Max(
     MDM_Hierarchie,
     HierarchieCode
    )+1

     

    Or

     

    First(
     SortByColumns(
     MDM_Hierarchie,
     "HierarchieCode",
     Descending
     )
    ).HierarchieCode+1

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 392

#2
WarrenBelz Profile Picture

WarrenBelz 364 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 271 Super User 2026 Season 1

Last 30 days Overall leaderboard