User Input (Dialog)

geri79geri79 Member Posts: 105
Hi,

I want to set a variable by user input with a dialog.
The input dialog is called by a push button in the job card form.

When I press the button the dialog pops up but there is also an error message that the form doesn't recognize "control 1".

The dialog is set as a global in the form. What else do I have to do?

Thanks a lot

geri79
geri

Comments

  • kinekine Member Posts: 12,562
    Can you post your code? I need to know the OPEN part and the Input part.

    And one thing - Dialog.INPUT is something, I am trying to avoid. There are another ways how to get the input...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Your form properties probably has a TableBoxID entered with value 1.

    Either remove this value or change it to your primairy control.
  • geri79geri79 Member Posts: 105
    Thank you guys. But I didn't get it...
    I tried other id numbers as well. Doesn't work.
    I guess my error is very simple. Is there a place where to assign control id's for a form?

    "OnPush:"

    sx:= sx + '\Type Reason (mandatory)/ Begründung für Änderung (Pflichteingabe) :\ #1########################## ';

    sx:= sx + '\ \ Press ENTER-Key to submit \ Drücke ENTER-Taste zum Speichern';

    DiscriptionInput.OPEN(sx);
    DiscriptionInput.INPUT(1,disc);
    DiscriptionInput.CLOSE;
    IF STRLEN(disc) < 1 THEN
    ERROR(' You must type a Description/Reason / Begründung muss eingegeben werden ');

    Ty.
    geri
Sign In or Register to comment.