preencher tabela 

preencher tabela 

  
Boa Tarde,
Gostaria de preencher a tabela (imagem em anexo) com o resultado de uma query com várias condições sendo que, duas delas são a linha com as zonas(centro, norte, lisboa...) e a coluna com os tipos (familiar, restauração, outros...). As outras condições são sempre iguais intependentemente da zona e do tipo...
O meu problema é que não sei como passar essas condições para a query de acordo com a célula correspondente.
Exemplo:
na celula corresponde a zona = Norte e tipo = familiar como passar esses parametros a query?

Alguma sugestão?

Obrigada.
CS

Hi Crisna,

Congrats on your first post on the OutSystems community forums.

Well, for all intents and purposes, there are three big ways to do it.

1 - Have a single query that retrieves all the required information in one go. That may be difficult, depending on your data architecture.
2 - Have a query that retrieves the content for a single line. Then execute the query N times (where N equals the number of lines in the table), and then append the results to a list, which will in turn be the source list for the Table Records.
3 - Have a function in your eSpace (i.e. an Action that you set as function) that receives a number of parameters - maybe area and type - and returns a string/number/value that is printed in each specific cell of the table.

Now, to pass parameters for the query, you should just have to open the simple query, and in the Parameters folder, click "Add Query Parameter" and you're set. You will have to set it with the data type that matches the Areas and Types in your database - i.e. are they stored in your database as text? As Integers? As codes?

I hope this helps. Let us know how it goes.

Regards,

Paulo Tavares

P. S. - We also recommend keeping your posts in English, since most of our members are from all around the world, and so it's more likely that someone will actually read your question and be able to answer you faster AND better :)
Olá,
Obrigada pela resposta :)
Segui a 3ª opção e funcionou perfeitamente.

Mais uma vez, obrigada pela ajuda.
Cmptos
CS