Form name 'xxxx' already exists as another form

Questions and answers for designing and implementing forms in Servoy

Form name 'xxxx' already exists as another form

Postby joe26 » Mon Aug 13, 2018 7:09 pm


I'm seeking to show a table that exists but just want to redraw or reshow a form with slightly different data in the in-memory dataset.

I get a 'form name already exists' error.

I can redraw the table if I show the form and then cancel because then I have access to the table and can remove it from the view.

The table is pre-built but is shown on request. Changing the data throws the error. It seems I cannot dispose of an in-memory data set programmatically. My last bit was through datasource.mem['xxx'].getFoundSet and clear, which didn't release the form to clear from history. My next step would be to momentarily show the view and cancel out since it is the view that is attached to the datasource. With that I may as well just drop out and recreate the view with a diff datasource, leaving the other hanging around.

What is the best way to reshow a form which you cannot remove from history?

I could regenerate the dataset with a new datasource name but that seems awkward and wasteful. It would be nice to dispose of the memory the other takes up already.

Posts: 172
Joined: Wed Jun 19, 2013 10:30 pm

Re: Form name 'xxxx' already exists as another form

Postby mboegem » Mon Aug 13, 2018 11:56 pm

Hi Joe,

should be as simple as generating your new data in a dataset and make a datasource from that dataset with the exact same name as the one you've used on that form.
Then show the form.
Done :-) !

In order to populate data for a in-mem datasource I always use 1 function, so the number of columns, column types, etc. won't change throughout the application.
Besides, if you make sure you can turn an empty dataset into a datasource using such a function, there's your way to clear the in-mem table.

Hope that helps
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

User avatar
Posts: 1769
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Form name 'xxxx' already exists as another form

Postby joe26 » Tue Aug 14, 2018 9:00 am

I should know that, but will go at it again.

Posts: 172
Joined: Wed Jun 19, 2013 10:30 pm

Return to Forms

Who is online

Users browsing this forum: No registered users and 6 guests