cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
LarsDP
Level 8

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
Community Support Team
Community Support Team

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.
LarsDP
Level 8

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)

Community Support Team
Community Support Team

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,307)