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 / Default Value Misbehaving
Power Apps
Answered

Default Value Misbehaving

(1) ShareShare
ReportReport
Posted on by 99

Hi all

 

I have a timesheets app, and the relevant section looks like this:

 

Crispybits7777_0-1720477383913.png

 

 

I've got a calculation that works out the number of hours for the total hours box into a variable called "CalcHours", but I only want to display it if either the top line is fully filled out, or the bottom line is fully filled out, or both lines are fully filled out. In the default property of the total hours box I have the code below, and the Onchange Property of all of the time entry boxes recalculates the CalcHours variable and resets the Total Hours box to default.

 

 

If( 
(!IsBlank(TL1ASH)&&!IsBlank(TL1ASM)&&!IsBlank(TL1AFH)&&!IsBlank(TL1AFM)&&!IsBlank(TL1PSH)&&!IsBlank(TL1PSM)&&!IsBlank(TL1PFH)&&!IsBlank(TL1PFM)) || 
(IsBlank(TL1ASH)&&IsBlank(TL1ASM)&&IsBlank(TL1AFH)&&IsBlank(TL1AFM)&&!IsBlank(TL1PSH)&&!IsBlank(TL1PSM)&&!IsBlank(TL1PFH)&&!IsBlank(TL1PFM)) || 
(!IsBlank(TL1ASH)&&!IsBlank(TL1ASM)&&!IsBlank(TL1AFH)&&!IsBlank(TL1AFM)&&IsBlank(TL1PSH)&&IsBlank(TL1PSM)&&IsBlank(TL1PFH)&&IsBlank(TL1PFM))
,CalcHours,Blank())

 

 

However, as you can see from the screenshot it's not blanking out the default when a partial line is filled in...

 

TL1ASH, TL1ASM, TL1AFH, TL1AFM, TL1PSH, TL1PSM, TL1PFH, TL1PFM are the 8 time entry boxes.

 

What am I missing?

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

    Never mind worked it out - instead of:

     

    !IsBlank(TL1ASH)

     

    Should be:

     

    !IsBlank(TL1ASH.Text)

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
Kalathiya Profile Picture

Kalathiya 401

#2
WarrenBelz Profile Picture

WarrenBelz 334 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 325 Super User 2025 Season 2

Last 30 days Overall leaderboard