1b.app
Link copied -

create automation once a day to record the result of executing a SQL query in an add. contact field

you need to create an automation once a day "Run a SQL query and write its result to an additional contact field"
request requirements: the request must return only one single value, such as . If the query returns several columns, then in the add. the field will be written the value from the first row of the first column of the result
add to action
- the "Query" field (the field in which you need to insert the text of the sql query)
- the field "Select an additional contact field in which to place the result of the query" (the field in which the result of the query will be placed)
- add the [userid] variable to use it in the request. When executing the request, [userid] should be replaced with the id of the contact being processed
Examples:
- an example of a request that is specified in the action settings: select count(id) from shoporder where userid=[userid]
- an example of a query that will be executed in the backend (after replacing v
Original question is available on version: ru

Answers:

Good afternoon, do you need direct queries to the database only for the specified count, or do you want to make other queries?
26.01.2021, 13:08
Original comment available on version: ru

Перегиняк Александр
Oneboxconsulting (интегратор)

Bodyako Dmitry
dev wrote:
Good afternoon, do you need direct queries to the database only for the specified count, or do you want to make other queries?

there will be other requests, more complex, but the result is always planned to be of the same type - some value is received and written to the add. field.
If there are options how to make it more universal, let's discuss.
It will probably be possible to apply this functionality to something else, for example, to write to directories, but so far the task is the same as announced in the description.
26.01.2021, 13:32
Original comment available on version: ru

Unfortunately, we cannot allow users to make direct queries to the database.
26.01.2021, 14:14
Original comment available on version: ru

Перегиняк Александр
Oneboxconsulting (интегратор)

Bodyako Dmitry
dev wrote:
Unfortunately, we cannot allow users to make direct queries to the database.

why? after all, there is a block of the report designer, with the help of which I can form queries in the database, and this block helps out a lot!
Under what conditions can you change your mind? who does it depend on?
26.01.2021, 17:50
Original comment available on version: ru

resolve the issue with CTO
27.01.2021, 10:33
Original comment available on version: ru

Перегиняк Александр
Oneboxconsulting (интегратор)

Bodyako Dmitry
dev wrote:
resolve the issue with CTO

thank you!
27.01.2021, 11:01
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment