Virtual list table not displaying records

So Iโ€™ve created this formula to pull in a list of Key columns IDs from a subtable

Select([Related RecTasks][RecTasksID],AND(
	[Item]<>"Fire Alarm System - Call Point",
	[Generic Process]<>"Trigger the fire alarm from a call point.  Do a different call point each week"
))
+
LIST(
IF(
ISBLANK([Oldest Callpoint Check])
,
ANY(Select([Related RecTasks][RecTasksID],AND(
	[Item]="Fire Alarm System - Call Point",
	[Generic Process]="Trigger the fire alarm from a call point.  Do a different call point each week"
)))
,
ANY(Select([Related RecTasks][RecTasksID],[Last Check]=
MIN(Select([Related RecTasks][Last Check],AND(
	[Item]="Fire Alarm System - Call Point",
	[Generic Process]="Trigger the fire alarm from a call point.  Do a different call point each week"
	)
))))
)
)

On its own the top bit

Select([Related RecTasks][RecTasksID],AND(
[Item]<>โ€œFire Alarm System - Call Pointโ€,
[Generic Process]<>โ€œTrigger the fire alarm from a call point. Do a different call point each weekโ€
))

is fine and pulls in 2 records displayed as Iโ€™d expect

But the second half just gives me
3X_1_1_11733d68f392106c3ca995519788953965d51fe6.png

**Which is sort of correct as there is only 1 key column Iโ€™m expecting. But why is it not displaying the record? The Inline view for it is standard. If I change the column type from List to Text it pulls in the correct key column ID. So Iโ€™m stumped **

Solved Solved
0 11 239
  • UX
1 ACCEPTED SOLUTION

That putting LIST() around everything doesnโ€™t works makes complete sense to me: youโ€™re making a list of lists, which definitely isnโ€™t what you want.

That the first two work also makes sense.

Why the third doesnโ€™t work is indeed confusing. Iโ€™ll bet itโ€™s a bug with list dereferencing ([Related RecTasks][RecTasksID]). Try rewriting the SELECT() to query the entire table rather than using the list dereference.

View solution in original post

11 REPLIES 11

Steve
Platinum 4
Platinum 4

Reformatted for clarity:

Select(
  [Related RecTasks][RecTasksID],
  AND(
    ([Item] <> "Fire Alarm System - Call Point"),
    ([Generic Process] <> "Trigger the fire alarm from a call point.  Do a different call point each week")
  )
)
+
LIST(
  IF(
    ISBLANK([Oldest Callpoint Check]),
    ANY(
      Select(
        [Related RecTasks][RecTasksID],
        AND(
          ([Item] = "Fire Alarm System - Call Point"),
          ([Generic Process] = "Trigger the fire alarm from a call point.  Do a different call point each week")
        )
      )
    ),
    ANY(
      Select(
        [Related RecTasks][RecTasksID],
        (
          [Last Check]
          = MIN(
            Select(
              [Related RecTasks][Last Check],
              AND(
                ([Item] = "Fire Alarm System - Call Point"),
                ([Generic Process] = "Trigger the fire alarm from a call point.  Do a different call point each week")
              )
            )
          )
        )
      )
    )
  )
)

Steve
Platinum 4
Platinum 4

What if you change it from List to Ref?

Column Name โ€˜User Related RecTasksโ€™ in Schema โ€˜Job_Schemaโ€™ of Column Type โ€˜Refโ€™ has an invalid app formula โ€˜=LIST( IF( ISBLANK([Oldest Callpoint Check]) , ANY(Select([Related RecTasks][RecTasksID],AND( [Item]=โ€œFire Alarm System - Call Pointโ€, [Generic Process]=โ€œTrigger the fire alarm from a call point. Do a different call point each weekโ€ ))) , ANY(Select([Related RecTasks][RecTasksID],[Last Check]= MIN(Select([Related RecTasks][Last Check],AND( [Item]=โ€œFire Alarm System - Call Pointโ€, [Generic Process]=โ€œTrigger the fire alarm from a call point. Do a different call point each weekโ€ ) )))) ) )โ€™. The type of the app formula โ€˜List of Ref to table โ€˜RecTasksโ€™ of Textโ€™ does not match the column type โ€˜Ref to table โ€˜RecTasksโ€™ of Textโ€™.

More info

BTW, remind me how to format code like youโ€™ve done above

Whoops! Try without LIST() around the expression.

Go edit your original post. I updated it with formatting to make it clearer.

Its already wrapped in List()

So as I said above, the result of the equation is f0010059 which is the key column ID. So I tried LIST(โ€œf0010059โ€) and got the same result. I.e. it says User Related RecTasks (1) but you canโ€™t click on anything

RecTasks[RecTasksID] is a Test type and also the key column

Even more confusingโ€ฆ

Works
Says 1 displays 1

LIST("f0010059")

Says 2 displays 2

Select([Related RecTasks][RecTasksID],AND(
	[Item]<>"Fire Alarm System - Call Point",
	[Generic Process]<>"Trigger the fire alarm from a call point.  Do a different call point each week"
))

Merge them together
Says 3 displays 1, just the result of LIST(โ€œf0010059โ€)

Select([Related RecTasks][RecTasksID],AND(
	[Item]<>"Fire Alarm System - Call Point",
	[Generic Process]<>"Trigger the fire alarm from a call point.  Do a different call point each week"
))
+
LIST("f0010059")

Does not work
List around just select function

LIST(
Select([Related RecTasks][RecTasksID],AND(
	[Item]<>"Fire Alarm System - Call Point",
	[Generic Process]<>"Trigger the fire alarm from a call point.  Do a different call point each week"
)))
+
LIST("f0010059")

List around everything

LIST(
Select([Related RecTasks][RecTasksID],AND(
	[Item]<>"Fire Alarm System - Call Point",
	[Generic Process]<>"Trigger the fire alarm from a call point.  Do a different call point each week"
))
+
LIST("f0010059")
)

Iโ€™m more confused now than when I startedโ€ฆ

That putting LIST() around everything doesnโ€™t works makes complete sense to me: youโ€™re making a list of lists, which definitely isnโ€™t what you want.

That the first two work also makes sense.

Why the third doesnโ€™t work is indeed confusing. Iโ€™ll bet itโ€™s a bug with list dereferencing ([Related RecTasks][RecTasksID]). Try rewriting the SELECT() to query the entire table rather than using the list dereference.

You were rightโ€ฆ This works fine

Select(RecTasks[RecTasksID],AND(
	[Job]=[_ThisRow].[JobID],
	[Item]<>"Fire Alarm System - Call Point",
	[Generic Process]<>"Trigger the fire alarm from a call point.  Do a different call point each week"
))
+
LIST("f0010059")

Is it just me that ends up stuck for 4 hours on these obscure bugsโ€ฆ

Dear God, no! How do you think I knew to suggest this? Hours upon hours of frustration!

BTW, I generally avoid dereferencing the Related lists entirely exactly because of oddities like this.

Top Labels in this Space