cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MatthewLeslie
Level: Powered On

warning the columns produced by this rule are all nested tables and or records, however the property expects at least some columns or simple values.

I am trying to use an If statement to view if a check box is ticked, if it is display all vehicles. If it is not checked only display vehicles that meet the criteria in the filter. However I keep getting the error listed in the subject line. 

 

Haha never thought id be the one making a post here but any help would be greatly appreciated. Thanks in advance. 

 

Function:

If(Checkbox1.Value = true, Vehicles.VehicleNumber, Distinct(Filter(Vehicles, LocKey = DataCardValue11.SelectedText.Result || LocKey = 60000184 || LocKey = 60000205 || LocKey = 50000502 || LocKey = 60000688 || LocKey = 60000690 || LocKey = 60000691 || LocKey = 60000693 || LocKey = 60000705 || LocKey = 50000199 || LocKey = 50000199 || LocKey = 60000177), VehicleNumber))

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: warning the columns produced by this rule are all nested tables and or records, however the property expects at least some columns or simple values.

HI @MatthewLeslie,

Could you please share a bit more about the error message within your app?

 

I have made a test on my side, please consider take a try with the following workaround:

If(
    Checkbox1.Value = true, 
    Distinct(Vehicles, VehicleNumber),
    Distinct(
              Filter(
                       Vehicles, 
                       LocKey = DataCardValue11.SelectedText.Result || LocKey in [60000184, 60000205, 50000502, 60000688, 60000690, 60000691, 60000693, 60000705, 50000199, 50000199, 60000177]
              ), 
              VehicleNumber
    )
)

Please consider take a try with above solution, then 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

9 REPLIES 9
Super User
Super User

Re: warning the columns produced by this rule are all nested tables and or records, however the property expects at least some columns or simple values.

Hi @MatthewLeslie 

Just to confirm, is this the formula that you're using for the Items property of a gallery control?

I suspect that this might solve the issue. Specifically, if the Checkbox is true and you just want to display the VehicleNumber column from Vehicles, the ShowColumns function will do this.

If(Checkbox1.Value = true, 
   ShowColumns(Vehicles, "VehicleNumber"), 
   Distinct(Filter(Vehicles, LocKey = DataCardValue11.SelectedText.Result || LocKey = 60000184 || LocKey = 60000205 || LocKey = 50000502 || LocKey = 60000688 || LocKey = 60000690 || LocKey = 60000691 || LocKey = 60000693 || LocKey = 60000705 || LocKey = 50000199 || LocKey = 50000199 || LocKey = 60000177), VehicleNumber)
)

Hope that helps.

 

 

MatthewLeslie
Level: Powered On

Re: warning the columns produced by this rule are all nested tables and or records, however the property expects at least some columns or simple values.

Hi @timl 

 

To confirm with you, yes it is in the Items property of a drop drown.

 

Thank you so much for your attempt, however I am still receiving the error highlighted in the subject line 😞 

I've tried numerous things this afternoon but am short of luck. 

See attached a screen shot showing the Blue lines, if i had to hover over them the error in the subject line would show.

 

If you have any other ideas they'd be much appreciated .

 

kind regards,

MatthewLeslie

Super User
Super User

Re: warning the columns produced by this rule are all nested tables and or records, however the property expects at least some columns or simple values.

Hi @MatthewLeslie 

The blue lines indicate that the search expression is non delegable. If your source data contains fewer than 2000 records, this will not be an issue.

To diagnose this, could you add a label to your screen and set the text property to this:

DataCardValue11.SelectedText.Result

Does the label show the selected text that you expect? If not, I would maybe try DataCardValue11.Selected.Result

 

MatthewLeslie
Level: Powered On

Re: warning the columns produced by this rule are all nested tables and or records, however the property expects at least some columns or simple values.

Hello again @timl 

 

Yes the label does show the text I would expect. If I had to Run the filter only in the Item property without the If statement it works perfectly populating the drop down but as soon as I want to include the check box and if statement the blue lines appear. 

Also if I change the Distinct to Sort it also works however this does not meet the performance I need the function to run with.

Also if I Tick the checkbox making the statement true, it works perfectly, Its just when I'm using the else section of the IF

 

How could I make the expression delegable and still reach my goal ?

 

Extremely appreciate your fast replies.

 

Please see attatched

Super User
Super User

Re: warning the columns produced by this rule are all nested tables and or records, however the property expects at least some columns or simple values.

Thanks for the extra details

Taking this one step at a time, if you use just the 'else' part of the formula in the dropdown, what result do you see? 

Distinct(Filter(Vehicles, LocKey = DataCardValue11.SelectedText.Result || LocKey = 60000184 || LocKey = 60000205 || LocKey = 50000502 || LocKey = 60000688 || LocKey = 60000690 || LocKey = 60000691 || LocKey = 60000693 || LocKey = 60000705 || LocKey = 50000199 || LocKey = 50000199 || LocKey = 60000177)

When you say that it doesn't work, do you mean that it's returning an error, or is it not returning the rows that you expect?

Community Support Team
Community Support Team

Re: warning the columns produced by this rule are all nested tables and or records, however the property expects at least some columns or simple values.

HI @MatthewLeslie,

Could you please share a bit more about the error message within your app?

 

I have made a test on my side, please consider take a try with the following workaround:

If(
    Checkbox1.Value = true, 
    Distinct(Vehicles, VehicleNumber),
    Distinct(
              Filter(
                       Vehicles, 
                       LocKey = DataCardValue11.SelectedText.Result || LocKey in [60000184, 60000205, 50000502, 60000688, 60000690, 60000691, 60000693, 60000705, 50000199, 50000199, 60000177]
              ), 
              VehicleNumber
    )
)

Please consider take a try with above solution, then 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

MatthewLeslie
Level: Powered On

Re: warning the columns produced by this rule are all nested tables and or records, however the property expects at least some columns or simple values.

@v-xida-msft  Thanks a lot for your help man. Really appreciate it, your work around seems to have fixed the problem.

 

Enjoy your Day.

 

Kind regards,

MatthewLeslie

MatthewLeslie
Level: Powered On

Re: warning the columns produced by this rule are all nested tables and or records, however the property expects at least some columns or simple values.

I am now seeing the values i expect both when the checkbox is ticked and when its not so thanks. However I do get a delegation warning, should i worry ?

Community Support Team
Community Support Team

Re: warning the columns produced by this rule are all nested tables and or records, however the property expects at least some columns or simple values.

Hi @MatthewLeslie ,

Firstly, the Delegation warning issue is not an error, it just means that you could not delegate the data process to your data source, instead, you could only process data locally in your app.

In default, you could only process 500 records at most locally, you could change this limit, then you could process 2000 records at most locally.

 

If the amount of your data source records is not more than 2000, you could ignore this warning issue. If the amount of your data source records is more than 2000, you could consider bulk-load your data source records into a collections in your app, then use the collection data source in your app.

Please check and see if the following solution would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Pulling-in-large-ish-SQL-tables/m-p/243777#M7...

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Sort-gallery-with-multiple-fields/t...

 

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.

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (5,980)