Hey guys,
So I have a table, and the table has a nested table to add images.
I want to take the first related image and use it as the background in the detail view of the main form.
I have acreated a virtual column and have set that as the main image.
The virtual columns formula is this:
`any(TOP(SELECT(Maintenance Images[Image], ([ID] = [_THIS].[id]), FALSE), 1))`
Note, this expression could significantly impact sync time.
One randomly chosen value from this list (
โฆTOP(
โฆThe list of values of column โImageโ
โฆfrom rows of table โMAINTENANCE IMAGESโ
โฆwhere this condition is true: ((The value of column โIDโ) is equal to (The value of โIDโ from the row referenced by โRepair Image Detailโ))
โฆ1))
This does not seem to return a image, Am I doing something wrong?
Any help would be splendid,
Stay Safe,
Solved! Go to Solution.
I assume your table has a ref_rows virtual column โRelated Maintenance Imagesโ?
You can greatly simplify your expression by using that.
Also, ANY(TOP(โฆ,1)) is pretty much equivalent to INDEX(โฆ,1)
So, this should work:
INDEX([Related Maintenance Images][Image] , 1)
As far as what is wrong with your expression, not sure, but I would suspect the condition in the select statement. Try to remove the any() and top(), and make sure the select is actually returning what it should be. Perhaps [ID], is the key-column of the images table, and not the ref column to the parent table?
I assume your table has a ref_rows virtual column โRelated Maintenance Imagesโ?
You can greatly simplify your expression by using that.
Also, ANY(TOP(โฆ,1)) is pretty much equivalent to INDEX(โฆ,1)
So, this should work:
INDEX([Related Maintenance Images][Image] , 1)
As far as what is wrong with your expression, not sure, but I would suspect the condition in the select statement. Try to remove the any() and top(), and make sure the select is actually returning what it should be. Perhaps [ID], is the key-column of the images table, and not the ref column to the parent table?
Amazing, Searching google and on the community I came up with Top , Learned something new again. Amazing. Thanks,
You might also try searching our documentation site.
[_THIS]
should be [_THISROW]
.
Thanks Steve, Extremely Helpful
User | Count |
---|---|
41 | |
28 | |
28 | |
23 | |
13 |