Relationships are not showing up .

Hi All,

I am using Servoy 8.0.2 . I am using a Web component . There are some relationships and some direct fields . The direct fields are showing up values . The relationships are not showing up .We are having data in the database. Is this a bug ? . How to forcibly update a relation ? . Please advise me .

I think you have to add some more details. I assume this is a web component in NG client.
How does your web component show data? I assume it’s a custom web component. Does it have a ‘dataprovider’ property? Maybe post the line defining that property from the spec here.

Do you have multiple such properties in your component or do you have multiple components, some linked to direct table columns, some to related data?
Is this record-view/table-view? How does the web component show the data it (should) get in the model?

Also check the browser console and application server logs for any error messages.

Hi ,

Thanks for your reply . This is a custom webcomponent in the NGClient . Please find the property from the spec here :

"model":
	{
		
		"jobname" : "dataprovider",
		"siteid" : "dataprovider",
		"servicerequested" : "dataprovider",
		"workperformed" : "dataprovider",
		"jobnotes" : "dataprovider",
		"statuscolor": "dataprovider"
	},

I have multiple such properties some linked to direct table columns and some to related data . The form beneath the component is based on record view .

Ok. So you assign some related DPs to those properties and some table DPs.
How does the component display those dataproviders in the browser? Is really nothing comming in browser js model.jobnotes or any of those that don’t work?

If you assign the same DPs that don’t work correctly in the custom component to standard TextBoxes/TextFields does it work there?

Hi ,

Thanks for your reply . The direct table field is displaying the data . but the related fields are not displaying the data .

I have also tested with standard textboxes . It doesnot work there .Please advise me .

I just tried it both in anchored layout (text field) and responsive layout (text box). And it worked for me.
The field showing a related data-provider showed correct content according to the selected record of the main form…

Can you create a small sample solution with a couple of records as sample data to show this problem?
Did you check for errors in the log files and browser console (in browser developer tools)? (workspace/.metadata/.log, application_server/servoy_log.txt)

It is unlikely that Servoy 8 has a generic issue on showing related fields.
To convince yourself about this, you may want to invest about 10 minutes like this (as Andrei already suggested):

Create a most simple test scenario independently of your current tables and forms:

  • 2 tables with just two fields in each, and a 1:1 relationship between them
  • A most simple form where you can show the records from table 1, and skip to the next record, plus the related field on that form

I bet that will work.
Then you could start to compare the differences between this working sample and your real tables.
I would first have a look to the relations, I think it is most likely that the involved relation does not work as expected, because then the related field will not show.