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

Invalid Argument Type on a Filter Function

Hi all,
I have a collection(AvailableRoomCollection) like below,
collections1.PNG
And If I click on MeetingTimeSuggestion then there is another collection like below
collections2.PNG
So I want to get data where OrganizerAvailability = "Free", I tried using the filter function but it didn't work. I get an error "Invalid Argument Type". I am getting "Invalid argument type" on the equals sign '='

 

ClearCollect(testColection, 
      Filter(AvailableRoomCollection, MeetingTimeSuggestions.OrganizerAvailability = "Free")
);

 

Any help is appreciated. Thanks in advance.


1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @jean2 ,

According to the formula that you mentioned, I think there is something wrong with it. Within your Filter function, the MeetingTimeSuggestions.OrganizerAvailability formula would return a Table value, it could not be compared with a Text value directly.

 

On your side, please consider modify your formula as below:

ClearCollect(
              testColection, 
              Filter(
                      AvailableRoomCollection, 
                      Not("Busy" in Concat(MeetingTimeSuggestions, OrganizerAvailability & ";"))
              )
);

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

3 REPLIES 3
Super User II
Super User II

I think there is a column name issue.

Your column name is MeetingTimeSuggestion and you are using MeetingTimeSuggestions.OrganizerAvailability

Can you please re confirm the spelling you are using in the Filter function?

 

To test scenario out I created a simple test and its working fine. This is on my button on select.

 

 

Collect( AvailableRoomCollection, { Name: "One", MeetingTimeSuggestion: { Title:1 ,OrganizerAvailability: "Free" } }, { Name: "Two", MeetingTimeSuggestion: { Title:2 ,OrganizerAvailability: "Busy" } } ) ; ClearCollect(testColection, 
      Filter(AvailableRoomCollection, MeetingTimeSuggestion.OrganizerAvailability = "Free")
);

 

 

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,

Rahber

Frequent Visitor

Hi @Rahber,
oh sory, there's a typo in my question. The actual column name is MeetingTImeSuggestions same as in the filter function.
collections3.PNG
 


Community Support
Community Support

Hi @jean2 ,

According to the formula that you mentioned, I think there is something wrong with it. Within your Filter function, the MeetingTimeSuggestions.OrganizerAvailability formula would return a Table value, it could not be compared with a Text value directly.

 

On your side, please consider modify your formula as below:

ClearCollect(
              testColection, 
              Filter(
                      AvailableRoomCollection, 
                      Not("Busy" in Concat(MeetingTimeSuggestions, OrganizerAvailability & ";"))
              )
);

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (12,846)