How do I create a query field, where I can enter a protocol number, which is already stored in the database, and return only the data for this protocol to me?
I created a "Search" via the Widget / Search, not the button when typing the protocol number, return the data, as it is in the debug below. Everything is going well, but how can I view this data?
Is there a better way to do this? Example, when typing in the search and clicking the button, it redirect to a page with this data.
My read_protocol is set like this:
Data Settings
All matching records
Array
(
[read_protocolo] => Array
(
[log] => Array
(
[0] => SELECT `Prot`.`aid` AS `Prot.aid`, `Prot`.`created` AS `Prot.created`, `Prot`.`modified` AS `Prot.modified`, `Prot`.`nome` AS `Prot.nome`, `Prot`.`celular` AS `Prot.celular`, `Prot`.`email` AS `Prot.email`, `Prot`.`secretaria` AS `Prot.secretaria`, `Prot`.`regiao` AS `Prot.regiao`, `Prot`.`assunto` AS `Prot.assunto`, `Prot`.`midia` AS `Prot.midia`, `Prot`.`descricao` AS `Prot.descricao`, `Prot`.`protocolo` AS `Prot.protocolo` FROM `udgtx_z_ouvidoria-cadastrar` AS `Prot` WHERE `Prot`.`protocolo` LIKE '%201902000040%' LIMIT 100;
)
[var] => Array
(
[0] => Array
(
[Prot] => Array
(
[aid] => 40
[created] => 2019-02-08 11:19:12
[modified] =>
[nome] => teste
[celular] => (74) 98819-9939
[email] =>
[secretaria] => SMEDUC
[regiao] => TIQUARA
[assunto] => SAÚDE
[midia] =>
[descricao] => teste de msg
[protocolo] => 201902000040
)
)
)
)
)
I need to do it in a way that only that particular protocol appears when it is searched.
Please explain in detail how I can solve
But all the data you need is right there.
{var:index.model.field}So if you put in a HTML block , because you have it set to return all matching:{var:0.Prot.nome}It will print "teste". If you have it set to first matching you won't have the index.
By the way if all you need to do is enter a code into a box and bring up the data for only that code, you don't need to use Chronoconnectivity, You can just do it in Chronoforms if that would be easier for you.
I want to create a field and a button
When entering the protocol number, display the data relating to it.
How can I do it?
Have a field and a button. In the submit event have a read_data action, set to first matching, in the where conditions you can put
protocol:{data:protocol}And then I gave you the reset of the information you need. Just make a table out of HTML or however else you want to display it, the values will be {var:read_data#.model.field}
