cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Fitz
New Member

Show Hide Asterisk Power Apps Dropdown

I have a Canvas App Form where I hide the continue button until all required fields are filled in i.e. are not blank.

 

Once the field is filled in the red asterisk is hidden. This works correctly for the text controls i.e. if I start typing in text the asterisk disappears and if I delete the text within the text control the asterisk reappears.

 

PROBLEM: However with the dropdown controls - by default they are blank - once an entry is selected the asterisk disappears BUT if I clear the entry (back to blank) the asterisk does not reappear.

 

This is the Visible function I am using on all the asterisks: If(IsBlank('DataCardValue-xxxxxx'),true,false)

 

Any help is appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

Great. I will try that - it may not be correct for my problem. It is not a ComboBox (see attachment).

 

My solution that works for Visible (I'm sure the function could be more succinct) is for an employees Title (Mr, Mrs etc...)

 

If('DataCardValue-Title'.Selected.Value="Mr" Or 'DataCardValue-Title'.Selected.Value="Miss" Or 'DataCardValue-Title'.Selected.Value="Mrs" Or 'DataCardValue-Title'.Selected.Value="Ms" Or 'DataCardValue-Title'.Selected.Value="Dr" Or 'DataCardValue-Title'.Selected.Value="Prof" Or 'DataCardValue-Title'.Selected.Value="Rev",false,true)

 

This shows and hides the asterisk as I intend.

 

I will be able to use your solution in another part of the form - but if there are any further suggestions to simplify this (I'm happy I've got it working with my own function - I'm sure it could be improved).

 

Thanks for the reply.

 

View solution in original post

4 REPLIES 4
iAm_ManCat
Super User II
Super User II

Hi,

 

I think you mean a combobox rather than a dropdown?

I was able to use your formula above with a combobox and confirmed the same behaviour.

 

I would suggest to use the following code for the combobox, where we both check for IsBlank and we check for the number of selected rows:

If(
   CountRows(ComboBox1_1.SelectedItems)=0 || IsBlank(ComboBox1_1),
   true,
   false
)

 

Cheers,

Sancho

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Great. I will try that - it may not be correct for my problem. It is not a ComboBox (see attachment).

 

My solution that works for Visible (I'm sure the function could be more succinct) is for an employees Title (Mr, Mrs etc...)

 

If('DataCardValue-Title'.Selected.Value="Mr" Or 'DataCardValue-Title'.Selected.Value="Miss" Or 'DataCardValue-Title'.Selected.Value="Mrs" Or 'DataCardValue-Title'.Selected.Value="Ms" Or 'DataCardValue-Title'.Selected.Value="Dr" Or 'DataCardValue-Title'.Selected.Value="Prof" Or 'DataCardValue-Title'.Selected.Value="Rev",false,true)

 

This shows and hides the asterisk as I intend.

 

I will be able to use your solution in another part of the form - but if there are any further suggestions to simplify this (I'm happy I've got it working with my own function - I'm sure it could be improved).

 

Thanks for the reply.

 

View solution in original post

Hi @Fitz ,

 

Have you tried using Len function instead of IsBlank? If you specify a single string as the argument, the return value is the length as a number. If Len returns zero then it is blank.

 

-bochie

For your dropdown, do you have 'AllowBlankSelection' to true?

 

I was able to use a dropdown with your original formula

If(IsBlank('DataCardValue-xxxxxx'),true,false)

and it put the asterisk back after I de-selected the item

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,236)