1
0
-1

Is it possible to use hash variables to do table lookup using a field other than ID?

For example I have a table "fruit" like this

ID      fruit                price

1         apple             100

2         orange           50


#form.fruit.price[{form.table.field}]#

Normally form.table.field should resolve to the ID of table fruit to get the price. However in my situation I cannot use the ID. How can I access the price by using the fruit column using hash variable?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      I don't think the hash variables can do a table lookup using a field other than ID. Maybe you could store the fruit name as the id.

        CommentAdd your comment...