I am struggling on creating a unique list for...

(Aaron Moolb) #1

I am struggling on creating a unique list for my workflow.

My table is a list of products ordered with a product image column. I use the same image for multiple products that have different sizes.

I am including full resolution photos of the products in my email with this expression:

SELECT(Vendor PO Products[Product Image],[Vendor PO ID]=[_THISROW])

My problem is that this expression is including duplicate images. I want only 1 of each product photo. How do I exclude duplicates from my Product Image column?

(Multi Tech Visions) #2

at the end of your SELECT() formula, add a third argument: true.

This limits the select to unique values, so duplicates only show up as one.


(Multi Tech Visions) #3

cl.ly - Screen Recording 2018-12-28 at PM.gif Screen Recording 2018-12-28 at PM.gif cl.ly

(Reza Raoofi) #4

That means each image can be in more than one row of Vendor PO Products table; I believe there are 2 options to work this out:

  1. Have the same image file name when more than one row are having the same image 2) Have a separate table to store product image so the product rows could have a Ref column to the image table, then the rows that shared the same image will be referring to the same row in the image table.

Then you should be able to use an expression like this in order to have a list of distinct images: SELECT(Vendor PO Products[Product Image],[Vendor PO ID]=[_THISROW],true)

(Multi Tech Visions) #5

@RezaRaoofi I like #2 better, parent-child structure is always the way to go.

If you set that hypothetical table up with more than just an image, you could set your column up as a REF, then you could de-ref the image instead of using a SELECT.

(Reza Raoofi) #6

@MultiTech_Visions exactly! :wink: :+1:

I was waiting for Aaron’s response to expand on #2 further, if needed.

(Aaron Moolb) #7

@MultiTech_Visions adding the TRUE as a 3rd argument worked. And I do have a table with just images that are Ref so I could bring in the ID… Thanks guys! Sometimes I am so deep in the expressions that I forget the simple basics so thank you for reminding me.

(Multi Tech Visions) #8

Do you dream in AppSheet? @Aaron_Moolb lol

I’ve been there. (^_^)

So deep in the rabbit hole of formulas, lol.