HLOOKUP - Horizontal lookup

Hello, the function is still in development, how can you dynamically substitute a value from a column in Lookup? If the column name is selected from the dropdown list.

Hi @BiBo.

Could you explain what you mean by “dynamically substitute a value from a column in Lookup”? Is something like the following example what you were looking for?

People.lookupOne(Email=$Work_Email)

George

Thank you for response.
Example in Grist
Something similar to selecting values ​​from a matrix.

I think getattr is what you’re looking for.

Here’s an example of a formula that I believe produces the results you’re expecting:

record = Table2.lookupOne(id=$Selector)

getattr(record, $Selector.Column)

George

1 Like

It works! Although I don’t understand how it works.