If we access the Select field with #, will the value or display be taken?
Using # retrieves the value. The same happens when using select.
How do I take a display?
To get the display immediately, you need to use the prefix s — #s.field_name.
At the moment when such an access is executed, the select is calculated, which heavily loads the server.
A less loaded way:
=: select(table: 'select_table'; field: 'select_title'; where: 'id' = #select_value)
How do I take a display using the select function?
By default, select takes the value. To get the display, you need to use sfield instead of field. This also affects the load.
Sometimes, we take the display for an individual select that depends on other fields — in this case, you will need to specify the fields it depends on in the tfield parameters.
Okay, so I took the value of a select, such as the id of an item. How do I get the price of that item now?
=: select(table: 'price'; field: 'unit_price'; where: 'id' = #unit_select_field)