I have an existing MySQL backend with a Microsoft Access frontend and use Scriptcase for some tasks that we do remotely.
Because the remote tasks are simpler and more predefined than the local tasks, I have to populate some lookup values in some of the columns that I are not needed in the Scriptcase detail form, and therefore only exist in “Field not shown” in the field configuration. The “Field not Shown” are “Not Null” columns in the MySql database.
When I use my Ajax Event prod_bvar_sku_onChange and look up all the values, it works as it should, as long as the destination fields are in the “shown” part of the Fields Configuration. My Ajax event looks like this:
$check_sql1 = "SELECT
prod_id,
prod_avar_id,
prod_bvar_id,
prod_p_price_total,
prod_s_price_total,
prod_sd_price_total,
unit_id
FROM
view_0_select_prod_details
WHERE prod_bvar_id = ".{prod_bvar_sku};
sc_lookup(rs, $check_sql1);
if (isset({rs[0][2]})) // Row found
{
{prod_id} = {rs[0][0]};
{prod_avar_id} = {rs[0][1]};
{prod_bvar_id} = {rs[0][2]};
{prod_p_price} = {rs[0][3]};
{prod_s_price} = {rs[0][4]};
{prod_sd_price} = {rs[0][5]};
{unit_id} = {rs[0][6]};
}
else // No row found
{
echo “SKU number does not exist!”;
}$check_sql2 = "SELECT
ord_det_descr
FROM
view_0_select_prod_info
WHERE prod_bvar_id = ".{prod_bvar_sku};
sc_lookup(rs, $check_sql2);{ord_det_instr} = {rs[0][0]};
{ord_det_invoice_descr} = {rs[0][0]};
I need the prod_s_price to be looked up and added in the Scriptcase detail form, the rest of the fields/columns are needed in the database when the data is inserted or changed.
How can I do this in Scriptcase?