cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Commander
Kudo Commander

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

[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?

 

 

 

 

3 REPLIES 3
Highlighted
Community Support
Community Support

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

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Kudo Commander
Kudo Commander

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

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)

Highlighted
Community Support
Community Support

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

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,565)