New Data Function to select related attributes

Kade Schemahorn shared this idea 3 years ago
Completed

New Data Function:


[Data Master], [Attribute 1] = [value], [Attribute 2]


In specified Data Master, function finds all data in Attribute 1 matching specified value and returns a list of the corresponding data under Attribute 2.


Example Data Master:


Objects


Index Type Value


1 Fruit Orange


2 Number 457


3 Fruit Apple


Example Usage:


[Objects], [Index] = [3], [Value]


returns...


"Apple"

Comments (1)

photo
1

Figured out how to do this by combining a Filter function inside of a Select function. It would probably be a good idea to include a tutorial on the site explaining specifically how to do this as it was pretty elusive for me.


SELECT [ FILTER [ DataMaster, Attribute A = "x" ] , Attribute B ]


To me, this is the key to the power of data masters in Justinmind and I never found anywhere that explicitly called out this technique.