cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rho1967
Helper III
Helper III

Filter Gallery and set text in Label

Hello everyone,

Is it possible to filter in a Gallery and then fill a Label?
I have a Value
Screen and gblFloor.

If these are equal and RemarkFullPage has text in it, then the label Lbl_ShowInformation must contain some text.

 

I came up with something like below. But unfortunately this won't work.
Filter(ScreenRemarks, Screen = gblFloor, If(IsBlank(RemarkFullPage), Lbl_ShowInformation.text = "test"))

 

A second question is it possible to fill a variable? and not Lbl_ShowInformation a text

 

I hope you understand this?

 

Greeting
Raymond

1 ACCEPTED SOLUTION

Accepted Solutions

@rho1967 ,

Assuming ScreenRemarks is the gallery name, this should work

If(
   ScreenRemarks.Selected.Screen = gblFloor && IsBlank(RemarkFullPage),
   "test"
)

 

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

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @rho1967 ,

It is not clear from your post where all these elements are, but assuming the fields Screen and RemarkFullPage and the label  Lbl_ShowInformation are in the gallery and gblFloor is a Variable, then the Text of the Label would be 

If(
   Screen = gblFloor && IsBlank(RemarkFullPage),
   "test"
)

 

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.

Thanx for the quick reply WarrenBelz,

 

Sorry for the confusion,

ScreenRemarks = Gallery
Screen = Column in ScreenRemarks
gblFloor = Param that I pass in the URL
RemarkFullPage = A label to be filled in the app.

 

Does this make things clearer?

 

 

 

@rho1967 ,

Except is Lbl_ShowInformation inside the gallery or not? If inside, the code I posted should work.

 

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.

No the label is not inside the gallery,
Is it possible to make a variable so I can use it in the label?

 

Thank you

Hi @rho1967 ,

I asked this as it needs to refer to only one record in the gallery - if it is outside the gallery, which record do you want to test? If the selected one

If(
   GalleryName.Selected.Screen = gblFloor && IsBlank(RemarkFullPage),
   "test"
)

The same applies for a Variable, which will be no more effective and needs a "trigger" to set.

 

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 Warren Belz

I applied the rule but get a red line under the = sign. What am I doing wrong here?

Greeting,
Raymond

Help1.png

 

@rho1967 ,

Assuming ScreenRemarks is the gallery name, this should work

If(
   ScreenRemarks.Selected.Screen = gblFloor && IsBlank(RemarkFullPage),
   "test"
)

 

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.

 

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (5,240)