Hello All,
I am attempting to open a dialog form, pass a value into one of its fields (this works). I would then like to fill out the 9 other fields on the dialog (I have tried these as variables and table fields, no joy) Once the fields have values I close the form (using 1 of 2 buttons, both have only this.close() commands) and attempt (this is where the problem is) to write the values into variables on the calling form before closing the dialog. Below is the section of the script I am struggling with.
tar=ui_get_text("NEW TARIFF","ENTER NEW TARIFF TYPE","BUS")
if tar=" " then
ui_msg_box("OKAY","OPERATION ABORTED")
END
end if
:form.load("batch_tar","Dialog")
:batch_tar.new_record()
:batch_tar:ttype.value=tar
:batch_tar:bandy.activate()
:batch_tar.activate()
:batch_tar.show()
lastbutton=:batch_tar.last_pressed()
if lastbutton="update_button"
ui_msg_box("UPDATE CHOSEN","")
descy=:batch_tar:bandy.value
rate_day=:batch_tar:day_rate.value
fdc_day=:batch_tar:day_fdc.value
minday=:batch_tar:day_min.value
rate_eve=:batch_tar:eve_rate.value
fdc_eve=:batch_tar:eve_fdc.value
mineve=:batch_tar:eve_min.value
rate_week=:batch_tar:week_rate.value
fdc_week=:batch_tar:week_fdc.value
minweek=:batch_tar:week_eve.value
ui_msg_box("UPDATE CHOSEN","2")
end if
:batch_tar.delete_record()
:batch_tar.close()
ui_msg_box("0","")
if lastbutton="close_button" then
ui_msg_box("WARNING","NO ACTION TAKEN")
END
end if
When I run the script and close the Dialog form I can see the first message box of UPDATE CHOSEN, but it does not run down to the second message, this leads me to think it is where I am trynig to return the values to the variable the script is falling over ??
Any help with the above would be greatly appreciated as I am now beginning to question my own name.
Cheers
Tom
I am attempting to open a dialog form, pass a value into one of its fields (this works). I would then like to fill out the 9 other fields on the dialog (I have tried these as variables and table fields, no joy) Once the fields have values I close the form (using 1 of 2 buttons, both have only this.close() commands) and attempt (this is where the problem is) to write the values into variables on the calling form before closing the dialog. Below is the section of the script I am struggling with.
tar=ui_get_text("NEW TARIFF","ENTER NEW TARIFF TYPE","BUS")
if tar=" " then
ui_msg_box("OKAY","OPERATION ABORTED")
END
end if
:form.load("batch_tar","Dialog")
:batch_tar.new_record()
:batch_tar:ttype.value=tar
:batch_tar:bandy.activate()
:batch_tar.activate()
:batch_tar.show()
lastbutton=:batch_tar.last_pressed()
if lastbutton="update_button"
ui_msg_box("UPDATE CHOSEN","")
descy=:batch_tar:bandy.value
rate_day=:batch_tar:day_rate.value
fdc_day=:batch_tar:day_fdc.value
minday=:batch_tar:day_min.value
rate_eve=:batch_tar:eve_rate.value
fdc_eve=:batch_tar:eve_fdc.value
mineve=:batch_tar:eve_min.value
rate_week=:batch_tar:week_rate.value
fdc_week=:batch_tar:week_fdc.value
minweek=:batch_tar:week_eve.value
ui_msg_box("UPDATE CHOSEN","2")
end if
:batch_tar.delete_record()
:batch_tar.close()
ui_msg_box("0","")
if lastbutton="close_button" then
ui_msg_box("WARNING","NO ACTION TAKEN")
END
end if
When I run the script and close the Dialog form I can see the first message box of UPDATE CHOSEN, but it does not run down to the second message, this leads me to think it is where I am trynig to return the values to the variable the script is falling over ??
Any help with the above would be greatly appreciated as I am now beginning to question my own name.
Cheers
Tom
Comment