list Database Sql Query not working

Confluence User - 13 Nov, 2024

why is inside the list if i place the the Database Sql Query for each for and run a code 
that code will work


but then when i place that database sql query outside 


the code won't be exuected 

just like a simple sql line for example 

delete from table 




the same exact code run in (1) but fails in (2) 

is there any reason why ??

forms;datalists;list;sql

3


13 Nov, 2024
confluenceUser
confluenceUser

Hi Mohammed Tarek,

we need more details to find the root cause, could you please provide the following details:

  • Error message from system logs when executing button (2)
  • The SQL query used in the buttons

Waiting your response,

Mahmood Qaid

13 Nov, 2024
confluenceUser
confluenceUser

UPDATE app_fd_Machine_Listing ml
LEFT JOIN (
    SELECT c_machine_name, COUNT(*) AS c_issue_count
    FROM app_fd_report_history
    GROUP BY c_machine_name
) rh ON ml.c_machine_name = rh.c_machine_name
SET ml.c_number_of_issues = IFNULL(rh.c_issue_count, 0)
WHERE ml.c_machine_name = rh.c_machine_name OR rh.c_machine_name IS NULL;


this is the code 

it work on the (1) but not on the (2)

there is no error message from the system logs 

14 Nov, 2024
confluenceUser
confluenceUser



Turned out that button (B) only works when having a row selected,
can you try selecting a row and then clicking the button?

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print