Hi there,
So I have a SharePoint list called 'Access_Control' which consists of an email and three other fields (TECL, EIECL, Satellite_ECL) as you can see below
I then have a drop-down list which stores the current drop-down option in a variable called ECL_Option.
Finally I have a gallery. I want the gallery's visibility to depend on the drop-down list option and the Access_Control database. If the drop-down option is Transpower, the User's email is in the database and TECL is true then the gallery should be visible otherwise the gallery shouldn't be visible.
My code so far is as follows:
If(ECL_Option="Transpower",
ForAll(Access_Control,
If(Title=User().Email, If( TECL="Yes", true, false)), false))
Here is a photo of the Power Apps screen I am working on:
I just am really struggling with the syntax of this language constantly maybe it is because I am use to object-orientated programming. As well as answering this question if anyone has any possible resources to learn the syntax better and kind of linking/nesting things together smoothly that'd be great. Cheers!
Solved! Go to Solution.
Hi @Xpholio ,
I will give you what I think is the solution and then explain it
ECL_Option="Transpower" &&
Countrows(
Filter(
Access_Control,
Title=User().Email &&
TECL
)
)>0
Firstly for a Boolean Variable such as Visible, you simply make a statement that can only be true or false and that that translates directly into the Visible property. Secondly, I am assuming that TCL is also a Yes/No field (which is actually true/false - if not use TCL="Yes" in the above.
So the statement says
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.
Hi @Xpholio ,
I will give you what I think is the solution and then explain it
ECL_Option="Transpower" &&
Countrows(
Filter(
Access_Control,
Title=User().Email &&
TECL
)
)>0
Firstly for a Boolean Variable such as Visible, you simply make a statement that can only be true or false and that that translates directly into the Visible property. Secondly, I am assuming that TCL is also a Yes/No field (which is actually true/false - if not use TCL="Yes" in the above.
So the statement says
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.
Hi @Xpholio ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
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.
Awesome yes it works perfectly. Thank you for providing an explanation too
Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.
Did you miss the call?? Check out the Power Apps Community Call here!
User | Count |
---|---|
278 | |
211 | |
77 | |
45 | |
39 |
User | Count |
---|---|
358 | |
227 | |
124 | |
72 | |
53 |