cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
settloe_99
Level: Powered On

Display hidden date field on dropdown

Hi,

 

I'm hoping someone can help a newbie with a problem I'm having with conditional displays.

 

I have a dropdown called Status and when I set Status to "02" I want a hidden date field to become visible. I've set the date field to Hidden and tried to use an If statement on the dropdown but I can't seem to get it to work.

 

Thanks

9 REPLIES 9
Super User
Super User

Re: Display hidden date field on dropdown

What you are looking for is the Visible property. Set Visible on the Date field to

If(Status.Selected.Value  = "02", true,false)

This will tell Powerapps that when you have selected the "02" choice from the dropdown named Status, you want the Date field with the visible property to be visible.  Otherwise, if anything else is selected, you want the date field to be invisible.

v-yutliu-msft
Level 10

Re: Display hidden date field on dropdown

Hi @settloe_99 ,

Could you tell me where do the drop down get value?

1)get value from data source

In this situation, could you tell me what is the field's data type that the drop down use?

If it's choice, you could try: 

If(Status.Selected.Value=02,true,false)

If it's text, you could try: 

If(Status.Selected.fieldname=02,true,false)

2)set the drop down's items: [01,02,03,...]

You could try: 

If(Status.Selected.Value=02,true,false)

 

 

Best regards,

Community Support Team _ Phoebe Liu

settloe_99
Level: Powered On

Re: Display hidden date field on dropdown

Thanks for your reply.

 

That's what I've been trying but I'm getting an error of "Name isn't valid. This identifier isn't recognized"?

 

Thanks

Super User
Super User

Re: Display hidden date field on dropdown

Can you post a screen shot of your error and of the definition of the two controls in question?  That would enable us to help you better.

Highlighted
settloe_99
Level: Powered On

Re: Display hidden date field on dropdown

Hi,

 

I'm getting the below. Thanks for your help.

 

Untitled.jpg

v-yutliu-msft
Level 10

Re: Display hidden date field on dropdown

Hi @settloe_99 ,

Could you show me how do you define the status control?

If the data of the control comes from data source, what's its data type?

 

 

Best regards,

Community Support Team _ Phoebe Liu

settloe_99
Level: Powered On

Re: Display hidden date field on dropdown

Hi,

 

The data source is a SharePoint list and the data type is set to Choice

 

Untitled.jpg

v-yutliu-msft
Level 10

Re: Display hidden date field on dropdown

Hi @settloe_99 ,

Please try this formula:

If(Status.Selected.Value=02,true,false)

Not If(Status.Select.Value=02,true,false)

 

Best regards,

Community Support Team _ Phoebe Liu

settloe_99
Level: Powered On

Re: Display hidden date field on dropdown

Hi,

 

Thanks for the reply but this doesn't work either. I get the same error on the first If statement.

 

Thanks