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 / Formula not working on...
Power Apps
Answered

Formula not working on EditForm1

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a 3 screen out of the box form that I am having just one issue with. 

 

On EditForm1 I have the below formula. It is set so that if the form is new, it finds the last ID, then grabs the column FormIDNumber and adds 1 (this part works fine) but if I am just editing the current record, it will not pull it's Parent.Default. On EditForm1, I have the DefaultMode set to FormMode.Edit.

 

Formula

Concatenate("IRF-",Text(If(EditForm1.Mode=FormMode.New,First(Sort('IRF Center (New)',ID,Descending)).FormIDNumber + 1,Parent.Default)))

 

This is day 3 for me. 🙂 What am I missing?

irfform.PNG
Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I actually wanted to add that it is seeing the correct FormIDNumber in the attached.

    irfform2.PNG
  • Verified answer
    Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    I've never been able to get IF() functions embedded inside other functions to work.  I know its more cumbersome, but I think you need to format it this way.

    If(EditForm1.Mode=FormMode.New,Concatenate("IRF-",Text(First(Sort('IRF Center (New)',ID,Descending)).FormIDNumber + 1)),Concatenate("IRF-",Parent.Default))
  • Verified answer
    eka24 Profile Picture
    20,925 on at

    It's means resolved. Then you can mark it as The solution to close it.

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Pstork1 !! That worked! Thank you so much. I got a double IRF-IRF-123 so i removed the last "Concatenate("IRF-" and left the ",Parent.Default) and it works perfectly. Thank you so much!

     

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    That would make sense if the IRF- prefix is part of the default. It wasn't completely clear from the original formula, but I figured the embedded IF() was the real problem.  Glad its working.

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 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard