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 restriction
Power Apps
Answered

Formula restriction

(0) ShareShare
ReportReport
Posted on by 16

Hi all,

 

Im building an leave application. In this when an user opens the screen the Datafield automatically reads the user ID by the below code.

 

User().FullName

 

After user creates the leave record, it goes to the supervisor for approval.

On a separate page, the records are be available for the manager using a gallery to view the pending records by filter.

 

Everything works fine on the new form when the user creates.

 

Now when a manager opens the record. It will open on edit form mode. so manager can click the Approve from a dropdown which will be visible only for manager on edit form.

But when the manager opens, the 1st data field that collects the user information executes and replace the employee name with the manager name on the same field.

 

Thats wrong. So I wants to restrict the formula that it will work only on New form at the time user applies for the leave and  

It leave the name as it is when a manager opens the same record on edit mode to approve the request.

 

If(FormMode=FormMode.New,User().FullName,?????????)

 

Please help me with a solution.

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,257 Most Valuable Professional on at

    Hi @maxhulk ,

    You did not state the form or field name, but you would need this

    If(
     YourFormName.Mode=FormMode.New,
     User().FullName,
     ThisItem.YourFieldName
    )

     

    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.

    Visit my blog Practical Power Apps

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,074

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 606

Last 30 days Overall leaderboard