List Add function not working in 7.01

Situation
List Add function not working in 7.01
it lets u type but doesnt add the test to the dropdown.
OpenEMR Version
I’m using OpenEMR version 7.01

Browser:
chrome, firefox
I’m using:

Operating System
I’m using:

Search
Did you search the forum for similar questions?

Logs
Did you check the logs?
Was there anything pertinent in them?
Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All

Hi @Robert_James ,

This is due to the error in SQL Syntax, Which can be resolved by implementing specific adjustments within the 'addlistitem.php’ [openemr/library/ajax/addlistitem.php] file, particularly at line 54. To rectify this, replace the existing code with the following code snippet.

 $exists_id = sqlQuery("SELECT * FROM list_options WHERE " .
    " list_id= ? " .
    "AND option_id = ? " . "AND activity = 1", array($list_id, $option_id));
if ($exists_id) {
    echo json_encode(array("error" => xl('Record already exist') ));
    exit;
}

Now you can able to add the county directly from the demographics form.
If you have any queries, do drop a mail to openemr.support@visolve.com
-Visolve OpenEMR Team

1 Like

Our Guys have corrected this code in 7.02 :slight_smile: