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)

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,713)