Help!
I wish to select all ‘Red’ products supplied by ‘Acme’ through a valuelist.
I have a compound join relationship between orders and products:
orders.company_id TO products.company_id
globals.colour (‘Red’) TO products.colour
I then have a valuelist based on this relationship. The valuelist displays the product name but returns the ‘prod_id’ dataprovider.
But this keeps giving me an error: Valuelist ‘product’ is based on table ‘company’ which is not accessible.
- I have deleted the relationship and valuelist and recreated them again but still get the same problem.
- I have checked that the valuelist does NOT relate to the ‘company’ table as described.
- I have checked that there are no calculations or aggregates that are not working which might interfere.
The solution has always worked regardless of the error. However, now v4.1 will not allow me to export until I have solved the problem.
Any ideas?
Maybe you ended up somehow having two valuelists with the same name - as the error doesn’t seem to be coming from the one you checked.
If you do CTRL+SHIFT+L and type “product” how many valuelists do you see?
Thanks for the tip Andrei but no joy. I have a value list ‘product’ and ‘product_r’ but surely Servoy would see this differently.
The relationship relates company_id to company_id but not using the company table. Is it possible this is confusing Servoy?
Can you attach the valuelist file “[your_solution]/valuelists/product.obj” and the relation file “[your_solution]/relations/[your_relation_name].obj”?
Hi Andrei
Previously, for the benefit of the forum, I have simplified the names. Here is the actual valuelist and relationship with the files attached:
VALUELIST: product_r
Show ‘name_display’, Return ‘prod_id’, Allow Empty
Using ‘orde_to_prod__valmovement’ relationship, No N-M selection
RELATIONSHIP: orde_to_prod__valmovement
orde.agen_id TO prod.agen_id
orde.movement TO prod.movement
objects.zip (727 Bytes)
And what is the exact error message with these new names?
ERROR: Valuelist ‘product_r’ is based on table ‘prod’ which is not accessible.
I have 3 errors of this type and yet when I click on a field using them, they work. I thought I’d I’d just made a simple mistake and used the wrong valuelist, relationship or table.
It sounds like there is something wrong with table “prod” on which the valuelist is based. Does that table exist? Are you able to create&use a simple form based on that table.
I do not see anything wrong in the obj files.
Hmm. Can you try to perform a clean Project - Clean - Clean all projects and see if the problem markers dissapear?
If everything works maybe the markers are just out of date.
Thanks for your efforts Andrei so far.
Clean project did not work.
I have several forms based on the ‘prod’ table and they work. I have checked that there is only 1 ‘prod’ table on the server. What is peculiar is that the first error refers to the ‘company’ table when it based on ‘order_to_prod’ relationship, nothing to do with ‘company’ other than using a foreign-key field called ‘company_id’.
Strange… If you clear the log (in your workspace/.metadata/.log), then start developer and perform clean again, do you get any exceptions in the log?
What is peculiar is that the first error refers to the ‘company’ table when it based on ‘order_to_prod’ relationship, nothing to do with ‘company’ other than using a foreign-key field called ‘company_id’.
I don’t understand what you are saying here. We were talking about relationship “orde_to_prod__valmovement” not “order_to_prod”. This is another valuelist based on another relation right?
Sorry if I confused you - I have 3 valuelists which are giving an error; 2 referring to the prod table and 1 to the company table.
I have cleared the log and they still appear on restart of Developer.
But are there any exceptions/stack traces in the log after restart/clean - I mean Project clean, not log clean now
?
I think I finally noticed what is wrong. The valuelist “product_r.obj” file is invalid:
dataProviderID1:"name_display",
dataProviderID2:"prod_id",
name:"product_r",
relationName:"orde_to_prod__valmovement",
returnDataProviders:2,
separator:" ",
showDataProviders:1,
sortOptions:"",
tableName:"prod",
typeid:34,
uuid:"561aaf22-4c93-46bc-a091-eb1cbea2011c",
valueListType:1
The line ```
tableName:“prod”,
If you manually remove that line from the .obj file (you can do in Developer "Window -> Show View -> Other -> General -> Project explorer" to see contents of the workspace and then right click on the file and choose open with text editor) and clean all projects it should work.
By jove, you’ve got it !
I have no idea how it got there though?
Thanks for all your help Andrei. The beers are on me at ServoyWorld ! ![Very Happy :D]()
You’re welcome
. Yes, I am curious to know how it got there as well.
For now we will try to make problems like this correct themselfes.
I tracked down the problem - how the tableName got there.
Valuelist editor can leave that behind when editing in a specific use case.
Solved starting with 4.1.2.
Also more specific problem markers are now added for this and the editor does some more checking when saving in order to correct already existing problems like this one.