cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Check if empty

Dear PowerApp Guru,

 

I've encountered a wall. Please advice.

I have a label that tells the user if he/she has been inducted or otherwise. If inducted, when is the expiry date. If not inducted, it'll show "Not inducted".

Currently, if my data source has values it'll show the dates but when there is no data, it's empty.

Initially it's 

"Inducted on:" & " " & Text(
    ThisItem.FO_IN,
    "[$-en-US]dd mmmm yyyy"
)

 I want to spice it up so 

"Inducted on:" & " " & If(IsBlank(ThisItem.FO_IN,"Not inducted", ThisItem.FO_IN))

 Error. My train of thought, if ThisItem.FO_IN data source has no date input (Excel), the label will show Not Inducted .

"Inducted on:" & " "Not inducted"

If thisItem.FO_IN data source has a date input, 

"Inducted on:" & " " & Text(
    ThisItem.FO_IN,
    "[$-en-US]dd mmmm yyyy"
)

 

Please help

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Hi @Shazarul 

I think you can resolve this by adding your label inside the If condition like so:

If(IsBlank(ThisItem.FO_IN,
   "Not inducted", 
   "Inducted on:" & " " & 
         Text(ThisItem.FO_IN,
              "[$-en-US]dd mmmm yyyy"
         )
   )
)

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Hi @Shazarul 

I think you can resolve this by adding your label inside the If condition like so:

If(IsBlank(ThisItem.FO_IN,
   "Not inducted", 
   "Inducted on:" & " " & 
         Text(ThisItem.FO_IN,
              "[$-en-US]dd mmmm yyyy"
         )
   )
)

View solution in original post

Highlighted
Frequent Visitor

If(
    IsBlank(ThisItem.FO_OUT),
    "Expires on: No records",
    "Expires on: " & Text(
        ThisItem.FO_OUT,
        "[$-en-US]dd mmmm yyyy"
    )
)

Hi! Yours was on the spot, missed the close parenthesis after IsBlank, I checked the PowerApp formula reference. Thanks!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,199)