web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Cant compare Record to...
Power Apps
Unanswered

Cant compare Record to Table

(0) ShareShare
ReportReport
Posted on by 17

I have the following code located on a button for the onSelect function.

 

 

If(ddFPCONStandard.Selected.Value = "DoD", ClearCollect(
 colFilterLevel,
 Filter(
 'DoD FPCON Measures',
 'Measure Type'.Value = ddFPCONStandard.Selected.Value && Level.Value = ddFPCONStandard_1.Selected.Value
 )),ClearCollect(colFilterLevel,Filter(
	'DoD FPCON Measures',
	'Measure Type'.Value = ddFPCONStandard.Selected.Value && Level.Value = ddFPCONStandard_1.Selected.Value
	&& Group.Value = ddFPCONStandard_3.Selected)));
Navigate(screenFPCONLevel)

 

 

Everything works fine until the last section with Group.Value = ddFPCONStandard_3.Selected)));. This is where I get the error and cant compare table, record. How would I go about changing one of these to match?

Categories:
I have the same question (0)
  • turnerj3 Profile Picture
    2,039 on at

    @NoobPower ,

    See if Value is an option on ddFPCONStandard_3.Selected.Value

  • NoobPower Profile Picture
    17 on at

    I tried that and it changes the error to these types can't be compared: Table, Error.

     

    If it helps the ddFPCONStandard_3.Selected.Value is from: 

    Filter('NWK - Projects', ID = ddFPCONStandard_2.Selected.ID)

     Group in this case is a text field.

  • Uditha_ISH Profile Picture
    45 on at

    In the last section, you equal to record and type. Thats why power apps get Erro,

     

    If(ddFPCONStandard.Selected.Value = "DoD", ClearCollect(
     colFilterLevel,
     Filter(
     'DoD FPCON Measures',
     'Measure Type'.Value = ddFPCONStandard.Selected.Value && Level.Value = ddFPCONStandard_1.Selected.Value
     )),ClearCollect(colFilterLevel,Filter(
    	'DoD FPCON Measures',
    	'Measure Type'.Value = ddFPCONStandard.Selected.Value && Level.Value = ddFPCONStandard_1.Selected.Value
    	&& Group.Value = ddFPCONStandard_3.Selected.Value)));
    Navigate(screenFPCONLevel)

     

    Try this. 

  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    To compare a record to a table you need to use the 'in' operator. If the record exists in the table it will be true, if it doesn't it will be false.  So is either Group.Value or ddFPCONStandard_3 setup to allow multiple selections?

  • NoobPower Profile Picture
    17 on at

    The value being sent to ddFPCONStandard_3 is a multiple selection.

     

  • turnerj3 Profile Picture
    2,039 on at

    See if SelectedItems is an option. That should be a table.

  • NoobPower Profile Picture
    17 on at

    When I try SelectedItems it gives an error and says it isnt recognized. Could part of my problem be the filter formula? 

    Filter('NWK - Projects', ID = ddFPCONStandard_2.Selected.ID)

    I have it filtering by ID, the label shows the text of the Group column, but would the backend filter only pull over the ID? I would guess I would want it to match by ID, but bring the group column data over?

  • NoobPower Profile Picture
    17 on at

    Looks like I needed to do ddFPCONStandard_3.Selected.Group

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard