cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Collection Reference for OnVisible

Hi guys

 

I have an app where I'm trying to add badges as gamification for my users. 

My app allows the users to input time coached for their employees. 

 

I have a collection called "FlashCol" that is capturing all the data inputted from users. 

It captures who they coached, and how long. My SharePoint has that captured as a column called "Time"

 

I wanted the badge to turn visible if any of their sessions get inputted with a time of 1 minute. 

 

I've tried a ton of variations of the following to get my badge picture to turn visible. No luck. 

Where am I going wrong? I get the x with "invalid argument type"

 

This is what I have for the Visible for the picture: If(FlashCol.Time=1,true,false)

@Willo 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Collection Reference for OnVisible

Hi @smartin ,

Where do you want to display the icon?

I assume that you want to display the icon in a gallery.

Sine FlashCol.Time is a field,  you couldn't compare it with a value directly.

I recommend you use the function of Lookup to get value from a field.

You could try this formula:

If(LookUp(FlashCol,Title=ThisItem.Title,Time)>1,true,false)

 

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Resolver II
Resolver II

Re: Collection Reference for OnVisible

Hi @smartin , my approach would be to create a variable, like a local variable UpdateContext({locWithinOneMinute: false}).

The Visible property of the badge should be just this variable locWithinOneMinute

When appropriate, change the value of the variable to true with the UpdateContext statement, which would make the badge visible.

 

Good luck!

Highlighted
Super User III
Super User III

Re: Collection Reference for OnVisible

Hi @smartin 

I think the issue here is that a collection is a structure that contains multiple rows, and that's the reason why an expression like "FlashCol.Time=1" isn't valid.

If you provide an expression that includes a row count, that should work better for you.

For example, this expression returns true if there are rows in FlashCol where time equals exactly 1.

 

If(CountRows(Filter(FlashCol,Time=1)) > 0,
true,
false
)
Highlighted
Community Support
Community Support

Re: Collection Reference for OnVisible

Hi @smartin ,

Where do you want to display the icon?

I assume that you want to display the icon in a gallery.

Sine FlashCol.Time is a field,  you couldn't compare it with a value directly.

I recommend you use the function of Lookup to get value from a field.

You could try this formula:

If(LookUp(FlashCol,Title=ThisItem.Title,Time)>1,true,false)

 

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Collection Reference for OnVisible

Hi @smartin - can you review the above replies and update the thread if they were helpful? 

 

Thank you,

 

@Anonymous 

Highlighted
Helper I
Helper I

Re: Collection Reference for OnVisible

My apologies for the delay. I've completed as requested. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,612)