Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum Subform Set Panels

  • Subform Set Panels

    Posted by Coralie on April 30, 2019 at 4:08 pm

    Hi everyone,
    I’m using a JsSubformSetPanels (running under Omnis 8).
    The last line of the openSubForms method is :
    Do lSetRow.$define(lSetName,lParent,lFlags,lOrderVar,lFormList)
    Do lSetRow.$assigncols(‘SubformSet’,”,kSFSflagSingleOpen+kSFSflagMinButton+kSFSflagAutoLayout+kSFSflagParentWidth,’iOpenForms’,lFormList)
    Do $cinst.$clientcommand(“subformset_add”,lSetRow)
    Things work well, until I go back to the main menu. If I do that, I can’t get my JsSubform again. Everytime I want to reach it, I get this error:
    ” Exception occurred when processing server response:
    subformset_add: A subform set with this name already exists”.
    Does anyone have any idea on what is wrong and how to fix it?

    Coralie replied 4 years, 10 months ago 2 Members · 3 Replies
  • 3 Replies
  • Paul Mulroney

    May 1, 2019 at 12:17 am

    Hi Coralie
    We hit the same issue. You need to remove the subform set when you’re done. We have a “done” button on the subform set, so when the user clicks the button it calls this:
    Do $ctask.trSubForm.$RemoveSFS()
    In the main form that created the subform, we have this method: $RemoveSFS() which does this:
    ; Remove the subform from the subformset. This is called from the jsContractItemEntry subform
    Calculate vsSetName as 'ContractItemEntry'
    Calculate vnID as 1 ;; 1=jsContractItemEntry subform
    Do $cinst.$clientcommand('subformset_formremove',row(vsSetName,vnID))
    Quit method

  • Coralie

    May 2, 2019 at 8:41 am

    Hi Paul,
    Thanks for your answer. The thing is, I’m using the subform as a kind of CRUD so I can’t use a “done” button. I only have the “back” button in the NavBar, which is implemented in the very first form so I’m not sure on how/where to handle the destruct of the SFS.

  • Coralie

    May 2, 2019 at 4:17 pm

    Hi again,
    small update, I’ve changed my NavBar to a MenuList so I can handle the destruct of the SFS. But when I execute the $RemoveSFS method, I get ” E101697: Notation not supported “. I’ve tried your code, I’ve tried the
    Do $cinst.$clientcommand(“subformset_remove”,lSetRow).
    If anyone has any idea on what I am doing wrong…
    Thanks everyone!

Log in to reply.