Valuelists in portals giving error.

Forum to discuss the new web client version of Servoy.

Valuelists in portals giving error.

Postby mikep » Tue Mar 10, 2020 7:13 pm

Hi,

I have the following error on ngclient when trying to use a valuelist in a portal:

ERROR com.servoy.j2db.util.Debug - The valuelist was already created for type: INTEGER
for the dataproviders: primefirm_id
So it can't be used also for type: TEXT for the dataprovider: firm_id
Please edit these dataprovider(s) (using table editor for database column or Edit variable context menu action for variables) of this valuelist: QueriedFirms so that they have the same type.

This doesnt happen when we run on smart client only on ngclient. It seems to be an issue where a valuelist is used outside of a portal and then on another form its used inside a portal and I get this message. Both of the dataproviders on the forms are set to integer so I dont understand why it saying its text. My guess is that inside the portal the display type of the field is text_field and maybe thats causing an issue but I am not sure. This is showing up in the logs alot causing lots of clutter and making it difficult to determine if its a real error or not. Is there something I am missing or can do to remove this error?

Thanks,
Michael
mikep
 
Posts: 1
Joined: Mon Oct 07, 2019 7:11 pm

Re: Valuelists in portals giving error.

Postby Andrei Costescu » Fri Mar 13, 2020 5:27 pm

Are you sure that "firm_id" is INTEGER? Is this a DB column or a variable?
If it is a form variable make sure you are looking at the right form (in case you have this variable name present in multiple forms).
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Valuelists in portals giving error.

Postby ellenmeserow » Fri Dec 31, 2021 1:28 am

Seconding this post. This is a real bug.
ellen escarcega (formerly meserow)
meserow design
Servoy 2019 9
MSSQL 2017
Windows AWS Servers
ellenmeserow
 
Posts: 366
Joined: Sat Aug 07, 2004 10:18 pm
Location: Seattle, WA USA

Re: Valuelists in portals giving error.

Postby pitc » Fri Dec 31, 2021 2:03 am

I have same error!
I spent a long time examining why it occurs.
It appears in my case when I touch the form but not really opening or showing it.
I can post error messages if need be.
However I was hoping it might clear up when NG2 is delivered...
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Re: Valuelists in portals giving error.

Postby jcompagner » Fri Dec 31, 2021 10:10 am

create a case with a sample that demonstrates this.
I guess we don't lookup in a certain situation the valuelist with the right type (so you get that error)

Besides the error that we need to look at is also something not working?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Valuelists in portals giving error.

Postby pitc » Fri Dec 31, 2021 4:13 pm

The valuelist (for me) works as expected after the initial load, so an annoyance - priority low.
Here is the error message in developer console (2 valuelists):
Code: Select all
ERROR com.servoy.j2db.util.Debug - Valuelist: time_frame used with different types
   at K:\CDW\svyNavigationUX\forms\svyAbstractNavigationUX.js:82 (beforeOpen)
   at K:\CDW\svyNavigationUX\forms\svyAbstractNavigationUX.js:46 (onOpenHandler)
   at K:\CDW\svyNavigation\svyNavigation.js:611 (fireEvent)
   at K:\CDW\svyNavigation\svyNavigation.js:593 (afterOpen)
   at K:\CDW\svyNavigation\svyNavigation.js:321 (openHandler)
   at K:\CDW\svyNavigation\svyNavigation.js:234 (open)
   at K:\CDW\Cdw_AnalyticsReports\forms\aar_dashboard.js:3146 (onCellDoubleClick_salesRepsGrid)
ERROR com.servoy.j2db.util.Debug - The valuelist was already created for type: INTEGER
for the dataproviders: vf_time_frame
So it can't be used also for type: TEXT for the dataprovider: null
Please edit these dataprovider(s) (using table editor for database column or Edit variable context menu action for variables) of this valuelist: time_frame so that they have the same type.
   at K:\CDW\svyNavigationUX\forms\svyAbstractNavigationUX.js:82 (beforeOpen)
   at K:\CDW\svyNavigationUX\forms\svyAbstractNavigationUX.js:46 (onOpenHandler)
   at K:\CDW\svyNavigation\svyNavigation.js:611 (fireEvent)
   at K:\CDW\svyNavigation\svyNavigation.js:593 (afterOpen)
   at K:\CDW\svyNavigation\svyNavigation.js:321 (openHandler)
   at K:\CDW\svyNavigation\svyNavigation.js:234 (open)
   at K:\CDW\Cdw_AnalyticsReports\forms\aar_dashboard.js:3146 (onCellDoubleClick_salesRepsGrid)
ERROR com.servoy.j2db.util.Debug - Valuelist: date_filter_options used with different types
   at K:\CDW\svyNavigationUX\forms\svyAbstractNavigationUX.js:82 (beforeOpen)
   at K:\CDW\svyNavigationUX\forms\svyAbstractNavigationUX.js:46 (onOpenHandler)
   at K:\CDW\svyNavigation\svyNavigation.js:611 (fireEvent)
   at K:\CDW\svyNavigation\svyNavigation.js:593 (afterOpen)
   at K:\CDW\svyNavigation\svyNavigation.js:321 (openHandler)
   at K:\CDW\svyNavigation\svyNavigation.js:234 (open)
   at K:\CDW\Cdw_AnalyticsReports\forms\aar_dashboard.js:3146 (onCellDoubleClick_salesRepsGrid)
ERROR com.servoy.j2db.util.Debug - The valuelist was already created for type: NUMBER
for the dataproviders:
So it can't be used also for type: TEXT for the dataprovider: null
Please edit these dataprovider(s) (using table editor for database column or Edit variable context menu action for variables) of this valuelist: date_filter_options so that they have the same type.
   at K:\CDW\svyNavigationUX\forms\svyAbstractNavigationUX.js:82 (beforeOpen)
   at K:\CDW\svyNavigationUX\forms\svyAbstractNavigationUX.js:46 (onOpenHandler)
   at K:\CDW\svyNavigation\svyNavigation.js:611 (fireEvent)
   at K:\CDW\svyNavigation\svyNavigation.js:593 (afterOpen)
   at K:\CDW\svyNavigation\svyNavigation.js:321 (openHandler)
   at K:\CDW\svyNavigation\svyNavigation.js:234 (open)
   at K:\CDW\Cdw_AnalyticsReports\forms\aar_dashboard.js:3146 (onCellDoubleClick_salesRepsGrid)
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Re: Valuelists in portals giving error.

Postby jcompagner » Mon Jan 03, 2022 11:50 am

i wonder why it is "dataprovider: null"
(then it is logical that it falls back to "TEXT" as a type)

so a sample where we can see this would be nice.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Valuelists in portals giving error.

Postby pitc » Mon Jan 03, 2022 3:52 pm

The error message seems to come from the statement
Code: Select all
var form = forms[formName]

in the svyAbstractNavigationUx.js at line 82 (and other places).

This checking for a form instance is done in many places.
I tried to comment out the statements but I still get the error.
I am not sure what happens during that "touch" but it does.
It is almost that the form instance triggers a check on the valuelist/variable.

I will try to create a sample where it does happen. But it might take a while.
In the meantime is there any other debug I could do?

@Ellen - have you any luck?
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Re: Valuelists in portals giving error.

Postby jcompagner » Mon Jan 03, 2022 4:14 pm

the thing is that you at that point create/load the form
so yes then all the elements/components are created and valuelists attached..

its the same if you just would do

forms.someform

where that "someform" has elements on it that are using valuelists.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Valuelists in portals giving error.

Postby pitc » Mon Jan 03, 2022 4:30 pm

But why does svyAbstractNavigation and other modules use this mechanism to check for form instance when it actually creates it?
Code: Select all
   // get the form instance
   var form = forms[formName];
   if (!form) {
      throw new scopes.svyExceptions.IllegalStateException('Cannot navigate to form because cannot find form instance ' + formName);
   }
   
   if (dataToShow) {
      success = loadFormData(form, dataToShow, dataSelectionType);
   }


if the dataprovider for that form for the valuelist is not yet loaded/initialized (i.e. null instead of 0 for a number type)when the form instance is created could that be where the error occurs?

Just as an experiment I removed the valuelist from the form and no errors occur. Perhaps I should add the valuelist to the element after the onLoad?
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Re: Valuelists in portals giving error.

Postby pitc » Mon Jan 03, 2022 6:53 pm

UPDATE:
After removing the valuelist from the form I then added a valuelist using the solution model to the component (combobox, choicegroup) in the onLoad method of the form and there is no error reported.
So that means to me there is something in the form "instantiation" for valuelist that 'croaks'.
This is a poor workaround!
Luckily I have only 2 or 3 places where this occurs.
I guess I can make do with the workaround for a while.
However if there are issues with other valuelists that are not text for the real type then I will reconsider!
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 5 guests