cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

Struggling with Syntax Filtering gallery using choice and multi-select choice fields

I am struggling to get the correct syntax for a filter statement.

 

GalleryFinanceView DataSource finticket

finticket data source

  Category column: choice (single select)

varUser: set to current user display name

FinanceAccessForFinTicket:

    Title Column - Name of Finance person

    Category Column (multi-select choice):  Assigned Categories for person

 

Goal:  Display only the items where the selected category is one of the categories for the matching person.

 

Current Item statement:   Filter(finticket, Category.Value in LookUp(FinanceAccessForFinTicket, varUser = Title).Category)

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
8 REPLIES 8
GersonGJunior
New Member

Hi, lookup function only returns the first match, try something like this: 

Filter(finticket, Category.Value in filter(FinanceAccessForFinTicket, varUser = Title).Category)

 

JR-BejeweledOne
Super User
Super User

That was my first try, but for some reason it doesn't like that.   Gives me an error on the Category.Value part.

 

FilterFinTicket.jpg



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
GersonGJunior
New Member

You can send a print of your project ? 

JR-BejeweledOne
Super User
Super User

Not sure what you are asking for?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
GersonGJunior
New Member

A picture of your app, with the fields. I want to see the field "Category Column (multi-select choice):  Assigned Categories for person"

That field isn't presented in the app as a control.   It's in one of the data sources that is in the app.  

 

The data source has a list of Finance users and they are assigned categories.   The category column is a multi-select field.

 

What I am doing is filtering the gallery by taking the current user (varUser) and querying that data source to see which categories are assigned to the user and then filtering against the Category value in the gallery (single select choice field).



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
GersonGJunior
New Member

Look this example: 

i have this data sources:

tbProdutos

  field: refeicao

 

tbPedidos

  field: dataCardapio

  field: nomeFuncionario

  field: refeicao

  field: bebida

 

The gallery is showing the values of current user and selected option of dropdown.

GersonGJunior_0-1605124117432.png

and the sintax is :

Filter(tbPedidos;Dropdown1.SelectedText.Value in Filter(tbPedidos;Office365Users.MyProfile().DisplayName = nomeFuncionario).refeicao)

 

 

 

 

Is tbPedidos - refeicao a choice field?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (69,263)