ADCS- Miniforms

MissesMagicMissesMagic Member Posts: 39
:?:

Hello everybody,

has anyone uses an own table in Miniform and can tell me how this works?

I have tried to copy one of these codeunits to another place and try to run it with a standard-Cronus (Mini)Form, but all I get is an error
Integer must not be blank. Integer is mising or invalid in the expression
or the error that the object must be compile (but I checked that it is already compiled).

The thing I want is to have no selection but only a table to fill in one value each row.

Perhaps I should say that I work with MBSN 4.00 with SP1.
Can someone help me please - I want to have a stress-free Chrismas :lol:

Thanks for all

Comments

  • KappeKappe Member Posts: 64
    Hello MissesMagic

    Did you solve this issue?
    I started now also with ADCS and get the same message ...

    Thanks in advance!

    Mfg
    Kappe
    ___________________________________________

    Kappe
  • MissesMagicMissesMagic Member Posts: 39
    Yes I have :D

    but it is long ago!

    Let me think about it:
    It was a card form and you have to write your own Codeunit like Object (- I think it is -) 7713:
    (Copy it as your own)

    Then edit Function ProcessInput:
    IF XMLDOMMgmt.FindNode(RootNode,'Header/Input',ReturnedNode) THEN
      TextValue := ReturnedNode.text
    ELSE
      ERROR(Text006);
    
    
    FuncGroup.KeyDef := ADCSCommunication.GetFunctionKey(MiniformHeader.Code,TextValue);
    ActiveInputField := 1;
    
    CASE FuncGroup.KeyDef OF
    ...
    
      FuncGroup.KeyDef::Input : BEGIN
        EVALUATE(FldNo,ADCSCommunication.GetNodeAttribute(ReturnedNode,'FieldID'));
        ADCSCommunication.FieldSetvalue(RecRef,FldNo,TextValue);
        RecRef.SETTABLE(<YourTable>);
        ADCSCommunication.SetRecRef(RecRef);
        
        <YourTable>.INSERT {or your own working code }
        
        RecRef.GETTABLE(<YourTable>);
        ADCSCommunication.SetRecRef(RecRef);
        ActiveInputField := ADCSCommunication.GetActiveInputNo(CurrentCode,FldNo);
        ACDSCommunication.FieldSetValue(RecRef,FldNo,TextValue)
      END;
    ...
    
    (only thing edited is the Case-Input-Area)
    and <yourTable> is a global (type "record") of your record

    I think this solves your problem
    (otherwise ask me again)

    MM
  • KappeKappe Member Posts: 64
    Hi

    Thanks for your fast reply!

    I made a copy of CU 7713 and modified the code also like you suggested.
    Switched also from Data List to Data List Input.
    Doesn't work...

    Here my section code:


    IF XMLDOMMgmt.FindNode(RootNode,'Header/Input',ReturnedNode) THEN
    TextValue := ReturnedNode.text
    ELSE
    ERROR(Text006);

    EVALUATE(TableNo,ADCSCommunication.GetNodeAttribute(ReturnedNode,'TableNo')); // Key1 = TableNo
    RecRef.OPEN(TableNo);
    EVALUATE(RecordId,ADCSCommunication.GetNodeAttribute(ReturnedNode,'RecordID')); // Key2 = RecordID
    IF RecRef.GET(RecordId) THEN BEGIN
    RecRef.SETTABLE(JobShipment);
    JobShipment.SETRANGE(ID,JobShipment.ID);
    JobShipment.SETRANGE(Job,JobShipment.Job);
    JobShipment.SETRANGE(Shipment,JobShipment.Shipment);
    RecRef.GETTABLE(JobShipment);
    ADCSCommunication.SetRecRef(RecRef);
    END ELSE BEGIN
    ADCSCommunication.RunPreviousMiniform(DOMxmlin);
    EXIT;
    END;

    FuncGroup.KeyDef := ADCSCommunication.GetFunctionKey(MiniformHeader.Code,TextValue);
    ActiveInputField := 1;

    CASE FuncGroup.KeyDef OF
    FuncGroup.KeyDef::Esc :
    ADCSCommunication.RunPreviousMiniform(DOMxmlin);

    FuncGroup.KeyDef::First :
    ADCSCommunication.FindRecRef(RecRef,0,MiniformHeader."No. of Records in List");

    FuncGroup.KeyDef::LnDn :
    IF NOT ADCSCommunication.FindRecRef(RecRef,1,MiniformHeader."No. of Records in List") THEN
    Remark := Text008;

    FuncGroup.KeyDef::LnUp :
    ADCSCommunication.FindRecRef(RecRef,2,MiniformHeader."No. of Records in List");

    FuncGroup.KeyDef::Last :
    ADCSCommunication.FindRecRef(RecRef,3,MiniformHeader."No. of Records in List");

    FuncGroup.KeyDef::PgDn :
    IF NOT ADCSCommunication.FindRecRef(RecRef,4,MiniformHeader."No. of Records in List") THEN
    Remark := Text008;

    FuncGroup.KeyDef::PgUp :
    ADCSCommunication.FindRecRef(RecRef,5,MiniformHeader."No. of Records in List");

    // IMPORTANT

    FuncGroup.KeyDef::Input : BEGIN
    EVALUATE(FldNo,ADCSCommunication.GetNodeAttribute(ReturnedNode,'FieldID'));
    ADCSCommunication.FieldSetvalue(RecRef,FldNo,TextValue);
    RecRef.SETTABLE(JobShipment);
    ADCSCommunication.SetRecRef(RecRef);

    JobShipment.INSERT;

    RecRef.GETTABLE(JobShipment);
    ADCSCommunication.SetRecRef(RecRef);
    ActiveInputField := ADCSCommunication.GetActiveInputNo(CurrentCode,FldNo);
    ADCSCommunication.FieldSetvalue(RecRef,FldNo,TextValue);
    END;

    // IMPORTANT

    ELSE
    ERROR(Text000);
    END;

    IF NOT (FuncGroup.KeyDef IN [FuncGroup.KeyDef::Esc,FuncGroup.KeyDef::Register]) THEN
    SendForm(ActiveInputField);

    Maybe you can see a "Feature" that is included.
    Thanks in advance.

    Mfg
    Kappe
    ___________________________________________

    Kappe
Sign In or Register to comment.