Hi community,
I am creating a prototype to search products, each product has a different variables associated (unlimited). I have saved the information in the MySQL database, the schema related with the search is:
In AppSheets one part of the form is that the user can select variables from a dropdown (it is working) and write the min and max values of the range. See the picture with the form:
I want to search the products that have the variables selected by the user. First of all, I trying to use the following formula to search the products that has the variable selected, it does not generate error, but it is not working because all products appears. I am not sure if "select" function is correctly for these case:
LINKTOFILTEREDVIEW(
"productos",
IN(
[Related productos_variables],
SELECT(
productos[Related productos_variables],
[Related productos_variables] = LIST([_THISROW].[Variable1])
)
)
)
The columns of the productos contains the following list. The first one is the used for the relation with productos_variables table.
Thanks for your advice.
Please explain in plain language what your expression is supposed to do (indented for clarity):
LINKTOFILTEREDVIEW(
"productos",
IN(
[Related productos_variables],
SELECT(
productos[Related productos_variables],
[Related productos_variables] = LIST([_THISROW].[Variable1])
)
)
)
Steve thanks for the advice, I made the change in the post.
I forgot to add the database query that execute an similar searches of what I would like in App Sheets.
SELECT producto.codigo, producto.nombre, variable.nombre, productoVariable.valorMin, productoVariable.valorMax
FROM productos producto
inner join productos_variables productoVariable ON producto.codigo = productoVariable.codigoProducto
inner join variables variable ON productoVariable.codigoVariable = variable.codigo
where variable.codigo = 1
User | Count |
---|---|
43 | |
26 | |
24 | |
14 | |
12 |