Looking Up Data

Discussion created by leftboot on Feb 19, 2018
Latest reply on Feb 23, 2018 by leftboot

I am trying to build a solution to create a heading for images like: "Living Things ~ Animals ~ "Animal", "Scientific Name", "Family" & "Family Order"." and have successfully created a partial solution within a script variable definition.  Using a combination of MBS plugin and the Case function I came up with this:


Let ([


a = MBS( "CGImageSource.Property"; $ref; 0; "{IPTC}.ObjectName");


b = Case (

a = "Birds"; "Living Things";

a = "Mamals"; "Living Things";

a = "Insects"; "Living Things";

a = "Domestic Animals"; "Living Things");


c =  MBS( "CGImageSource.Property"; $ref; 0; "{IPTC}.Keywords")];


If ( a = "Birds" ; b & " ~ " & a ; a ))


(The variable $ref is required to call image info from the original image source.)


What needs to be completed (and where I am stuck) is to look within the keywords (variable C) and find the animal within the keywords.  I have created a table with all possible answers would like to pull the related data from that table.  The table contains "Animal", "Scientific Name", "Family" & "Family Order".  A example of keywords contained in variable c is:


[ACCIPITRIFORMES], [Kites- Hawks and Eagles], {Accipitridae}, {Haliaeetus leucocephalus}, afternoon, autumn, Bald Eagle, Canada, Canadian, color image, colour image, daytime, environment, fall, first year, golden hour, juvenile, landscape, Leftboot, Leftboot Nature, Leftboot Nature Photography, natural world, nature, Nature Break, Nov., November, one animal, one bird, outdoors, Ryan Peterman, Sask., Saskatchewan, SK, soaring, sunset, wild life, wildlife, wildlife photography


So I would need to find "Bald Eagle" and have it return:  Bald Eagle ~ Haliaeetus leucocephalus ~  Kites- Hawks and Eagles ~  ACCIPITRIFORMES.  I have tried the filter value function and I got no results.


Am I making it too complicated?!