Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

<F9> - Save does not work

Hi

When I use the NDW_DATEPICKER funtion with the option function it stops the key from working.
the only way I can save the record is when I close the window and then save the changes.

DateFrom = Dialog_Box('NDW_DATEPICKER', @Window)

not sure how I can get this to work.

Thanks Anton

Comments

  • Sorry need to add it is the function key what is not working.

    Thanks Anton
  • it is the F9 key .
  • Hello Anton. I believe what you are reporting is that the normal save key (F9) isn't working while the DatePicker dialog is displayed. Correct? I'll comment further assuming that this is the issue you are dealing with and perhaps offer some thoughts.

    As evidenced by the code you shared in your original post, NDW_DATEPICKER is being called as a modal dialog box (this is how the Dialog_Box function works). Since this is a modal dialog, it is suspending the parent form from all user input. That is the nature of a modal process. Hence, the F9 associated with your MDI Frame is inaccessible, as are all other keyboard shortcuts that are built into the MDI Frame. This is just basic OI and modal dialog behavior.

    There are a few ways, perhaps, to provide a behavior you want but I would like to better understand your use case. Is the NDW_DATEPICKER being displayed as a psuedo-dropdown for an editline control? Is this editline control in a larger data entry form or is it in a small window that is acting as a data collector? Were you hoping to allow the user to pick a date from the DatePicker and then press F9 to save the date to the editline or were you hoping that F9 would pick the date and simultaneous save the data record in the data entry form. Each of these scenarios can be accomplished, but the implementation will vary. Thus, I'm trying to better understand the big picture.
  • Hi Don

    Once we select with the NDW_DATEPICKER the date and it populate the data in the form and date NDW_DATEPICKER is closed it will not allow to use the save (F9) key to save the record. The (F8) clear the form is still working. The only way to save the record is to close the window then use the message .. to you want to save the record.

    Thanks Anton
  • Ah...okay. So you have returned control back to the original form, which I assume is an MDI child. F9 doesn't work but F8 does. Do you have a save button in the ribbon control? Does it work?
  • My guess is that the form doesn't know it changed.
  • Hi Don

    it works with the ribbon save button but not with the function Key (F9)

    Thanks
  • Hi Anton,

    We've duplicated the issue and are currently working to resolve. We'll respond ASAP when we have a solution.
  • We are still looking into this issue but we have a better understanding of the problem. It seems that the form which launched the dialog is not getting activated when the dialog is closed, so the promoted ACTIVATED event handler does not turn F9 back on. F9 is toggled on or off based on which form get activated (or deactivated) due to our security system. F8 is always enabled, which is why it still works for you. While we are still looking to solve this in a more general manner, there is a work-around you can implement. Here is an example of what your code can look like:
    SelectDate: rv = Dialog_Box("NDW_DATEPICKER", @Window) Send_Event(@Window, "ACTIVATED") If Len(rv) then Set_Property(@Window:".EDL_DATE", "INVALUE", rv) return
  • Hi Don

    This way it is working.

    Thanks Anton
Sign In or Register to comment.