Tagged: subformset_add
This topic contains 3 replies, has 2 voices, and was last updated by Coralie 1 year, 8 months ago.
-
AuthorPosts
-
April 30, 2019 at 4:08 pm #20170
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?
Regards,
Coralie.May 1, 2019 at 12:17 am #20171Hi 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
A man rushed into the doctor’s office and shouted, “Doctor! I think I’m shrinking!”
The doctor calmly responded, “Now, settle down. You’ll just have to be a little patient.”Paul W. Mulroney
We Don't Do Simple Pty Ltd
ACN 161 009 374
Bentley Western Australia 6102May 2, 2019 at 8:41 am #20214Hi 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.
May 2, 2019 at 4:17 pm #20228Hi 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!Regards,
Coralie. -
AuthorPosts
You must be logged in to reply to this topic.