Managing valuelist items with tabpanels

Hi,

I created a table meant to provide values to valuelists. At the moment, I created two fields, each providing values to a different list (categories and job description).
To let users easily add or remove items to a valuelist, I created two form with a method the finds only records with valid values in the field. After that, I put those forms in a tabpanel on a “Settings” form.
The method is (the other one is identical, but refers to another form and field):
forms.categorie.controller.find()
forms.categorie.categoria = “%”
forms.categorie.controller.search()
forms.categorie.controller.sort(‘categoria asc’);

And here comes the problem:
the method works fine if launched in its original form but, since I want to refresh the list each time the Settings form is showed, I attached it to OnShow property of the original form. But I get an error (search failed, try to show all) every time I open the Settings form.
After the error, both the methods are triggered correctly switching from a tabpanel to the other.
But I don’t understand what causes the error…

Are those in both cases text columns? what tells the detail in Error dialog?

Jan Blok:
Are those in both cases text columns? what tells the detail in Error dialog?

Yes, text columns. The error message gives me no details (see attach).

Is that settings form shown in a tab?

Does the error only occur onces? (when you showing the settings form for the first time?)

jcompagner:
Is that settings form shown in a tab?

No, the settings form is shown directly: it contains the tabs related to valuelist table.

jcompagner:
Does the error only occur onces? (when you showing the settings form for the first time?)

Yes. After the first time, everything works.

ok i think i have fixed that problem. Can you test this when RC9 will come out (most likely today or tomorrow)

jcompagner:
ok i think i have fixed that problem. Can you test this when RC9 will come out (most likely today or tomorrow)

Sure… :D

Thanks

jcompagner:
ok i think i have fixed that problem. Can you test this when RC9 will come out (most likely today or tomorrow)

I’m still having problems with this functionality: now, the first time the form shows up, instead of doing a search (I wrote a simple method that searches a “%” in the ‘profession’ field), it creates a new record with a “%” symbol in that field.
As before, everything occurs the first time you open the form; after that, everything works fine.

I had the same problem and I solved it.
try to load the form first with records:

forms.formname.controller.loadAllRecords();

than do the search.

HJK:
I had the same problem and I solved it.
try to load the form first with records:

forms.formname.controller.loadAllRecords();

than do the search.

It doesn’t work (I still have the SEARCH FAILED message + empty related record created).
I solved the problem using two different relations, but without this problem I would have saved two relations and two fields :wink:

Which version of Servoy are you using?

HJK:
Which version of Servoy are you using?

1.2 Final, OSX.2.8

Can you make a demo-solution (with the problem)
and upload it here?

HJK:
Can you make a demo-solution (with the problem)
and upload it here?

I’d be glad to, if I could get rid of the password-protection :)

What do you mean by that?
you can export a solution without a password!

HJK:
What do you mean by that?
you can export a solution without a password!

I’m afraid not (unless I’m doing something wrong when exporting) :)

It’s a problem I encountered some time ago (I think I wrote about it): if I choose to export a solution, I have two choices:

  1. export a protected solution
  2. export the solution without the password

If I choose NOT to include the password, the export procedure fails, because I didn’t include the password.

Sort of a Catch 22 :wink:

Are you trying to export a protected solution as unprotected?

Jan Blok:
Are you trying to export a protected solution as unprotected?

Yes: my goal is to get rid of the password I put into it.

Servoy 2.0 will have the option to unprotect a solution when the password is known.