Lookup Path from Folder as a Table

I have a table called `"photo"` which holds photos and their metadata. The photos are stored in Google Drive, and I also have that folder loaded as a table called `"photos_Folder"`.

Here are those tables:

Screenshot 2023-11-08 at 4.38.28โ€ฏPM.png

 

Screenshot 2023-11-08 at 4.38.16โ€ฏPM.png

I want a bot to set the `photo[file_url]` value whenever a new photo is added to the table based on this trick. It has to get the "photos_Folder[_ID]" value and concatenate that on the end of the Drive URL. I'm trying to do that by using LOOKUP on `photo[file_path]` and `photos_Folder[Path]`.

I'm using this expression. It's not doing what I want, and I don't really have a good way to troubleshoot it. Can anybody evaluate it and tell me what I'm doing wrong?

CONCATENATE("https://drive.google.com/uc?id=",
LOOKUP([_THISROW].[file_path],"photos_Folder","Path","_ID")
)

Here is my bot configuration:

Screenshot 2023-11-08 at 4.35.02โ€ฏPM.pngScreenshot 2023-11-08 at 4.35.16โ€ฏPM.png

Solved Solved
0 1 121
1 ACCEPTED SOLUTION

I fixed the expression. It needed to look for the `photo[file_path]` value as a substring of `photos_Folder[Path]`.

CONCATENATE("https://drive.google.com/uc?id=",
SELECT(photos_Folder[_ID],CONTAINS([Path],[_THISROW].[file_path]), TRUE)
)

View solution in original post

1 REPLY 1

I fixed the expression. It needed to look for the `photo[file_path]` value as a substring of `photos_Folder[Path]`.

CONCATENATE("https://drive.google.com/uc?id=",
SELECT(photos_Folder[_ID],CONTAINS([Path],[_THISROW].[file_path]), TRUE)
)
Top Labels in this Space