cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
USSJona
Frequent Visitor

Using Valid for Displaymode

Hi All,

 

I have an issue with 'FormName.Vaild' to change the display mode of an icon.

 

The function works fine but the icon does not change !

 

Disable.png

As shown above the code is displaying 'Disable' because one of the items has not been selected.

 

Edit.png

And as you can see above when all 'required' items are completed the display mode changes to 'edit'.

 

But, as you can also see the icon remains in edit mode irrespective.

 

I cannot see the answer, please help.

 

Many thanks,

7 REPLIES 7
Nogueira1306
Super User
Super User

Why dont you checkk if the fields are empty or not? You can use IsBlank() or IsEmpty() funciton 

 

https://docs.microsoft.com/en-US/powerapps/maker/canvas-apps/functions/function-isblank-isempty

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

I am not sure but it only sees if the form is valid or not when you try to submit it.

RandyHayes
Super User
Super User

@USSJona 

Using the Valid property on the form is an excellent option as it will tell you that it is valid.

The way Valid works is that, if a field is required, it looks for a blank value in the Update property.  If it is blank, then the Valid is false, if it is not blank, then at least that datacard is valid.  Valid at the form level will "and" all of the datacard Valid properties together.

So, for the "is the vehicle in good condition" field, what is the Update property and what is the underlying column type and what is the Items property of the Dropdown?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi Randy,

 

I am using Dataverse for the Data.

Update Property: DataCardValue15.Selected.Value

Underlying column: Choice

Items Property: Choices(Check) 

Hi Randy,

 

Can you please follow up on the information requested.

 

Many thanks, Barry

RandyHayes
Super User
Super User

@USSJona 

Sorry for the delay.

The properties look good!

 

So are you stating that the Valid property of the form is true even if the combobox - DataCardValue15 - has nothing in it??  AND, to be clear, your Required property of that datacard is set to true?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi Randy,

 

I want the icon highlighted in the pictures above to be disabled until all the questions have been answered (with the exception of 'Notes')

 

All the card 'Required' properties are set to true, as shown in the pictures by the stars.

 

The 'If' statement in the icon 'DisplayMode' property using 'Form.Valid' is working, as demonstrated in the pictures above, if all the questions are answered 'If' = edit, if not 'If' = disabled. However, as shown in the pictures above the icon remains in the edit state regardless of the 'If' statement ??

@RandyHayes 

I've discovered what the issue is, the 'FormName.Valid' only works with a 'New' form, it will not work with an 'Edit' form.

 

Is this correct, if yes is there a work around for this?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,032)