cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RM365
Regular Visitor

Simple If statement in custom sharepoint list form

Hi, I have a really simple concept that I just cannot get to work. I am customizing a SharePoint list form and I want to control the visibility of a lookup field based on the setting of a Yes/No toggle in the preceding question.

 

i thought something like this would work: If(DataCardValue6.Value=1,true,false) in the Visible function of the lookup field.

 

DataCardValue6 is the Yes/No toggle in the preceding question

I have tried 1 / On / Yes in the logic and nothing works

 

what am i doing wrong?!

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @RM365 ,

Simply set the Visible of the Lookup control to 

DataCardValue6.Value

If it is true, then the Visible will be also true (and the opposite)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @RM365 ,

Simply set the Visible of the Lookup control to 

DataCardValue6.Value

If it is true, then the Visible will be also true (and the opposite)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Nogueira1306
Super User
Super User

That DataCard returns 2 values (true or false)

So, if you put 

 

DataCardValue6.Value

 

 

on visibility, it will solve your problem 

@Nogueira1306 ,

Just what I posted about 10 minutes before . . .

Told you it was simple - thanks @WarrenBelz - works a charm

and thanks @Nogueira1306 also!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,611)