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 / Something wrong with t...
Power Apps
Unanswered

Something wrong with this SIMPLE If function? I don't see it

(0) ShareShare
ReportReport
Posted on by 125

[EDIT : I've solved it for now using a length check on property X]

 

Hi, 

 

Long time since I've been on this forum.

I'm back with a lot more knowledge about Powerapps but this one is just baffling:

(as seen here https://i.imgur.com/qIrHEHZ.gif )

 

I have a function that fills a label.Text with this:

If property X is blank, show property Y, else, show property X

 

It works if X is blank, then it shows Y, but if X is not blank, then it displays ... blank.

If I edit my formula to just show X, then it shows X. 

 

Anybody got an idea?

 

 

 

 

id.gif
Categories:
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @LarsDP ,

    Could you please share a bit more about your issue?

    Have you solved your problem?

     

    Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Please also consider take a try with the following formula:

    If(
     IsBlank(Trim(ThisItem.OpportuniteitsNumberIntern)),
     ThisItem.PK_ItemID,
     ThisItem.OpportuniteitsNumberIntern
    )

    or

    If(
     Len(ThisItem.OpportuniteitsNumberIntern) = 0,
     ThisItem.PK_ItemID,
     ThisItem.OpportuniteitsNumberIntern
    )

     

    If you have solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

     

    Best regards,

  • LarsDP Profile Picture
    125 on at

    Hi Kris

     

    I've fixed it with the Len() function indeed, but this still seems like a bug, since the value can be displayed when I assign it directly.

    But since I got it working, I'm just gonna gonna let it be, let it be.

     

    I'll accept your answer as the solution but if someone knows why  my first simple If() function did not work, please tell me because I'd like to know what went wrong here (My guess still is something faulty in the Powerapps lairs)

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @LarsDP ,

    Currently, I could not reproduce your issue on my side.

     

    I would do more testing on my side to find why this issue would cause. As an alternative solution, please also consider take a try with the following formula:

    If(
     ThisItem.OpportuniteitsNumberIntern = Blank() || ThisItem.OpportuniteitsNumberIntern="",
     ThisItem.PK_ItemID,
     ThisItem.OpportuniteitsNumberIntern
    )

     

    If we find the reason causing this issue, I would reply here.

     

    Best regards,

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard