Get Relations

Questions, tips and tricks and techniques for scripting in Servoy

Get Relations

Postby Hans Nieuwenhuis » Sun Dec 20, 2009 7:42 pm

Hi,

I wonder if it is possible ( in a method) to get the relations "under" another relation.

For instance i have forms.form1.relation1

there are relations "under" relation1 :

forms.form1.relation1.relationa
forms.form1.relation1.relationb

Is it possible to loop trough the relations "under" forms.form1.relation1 in order to get relationa and relationb ??

Regards,

Hans
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: Get Relations

Postby Hans Nieuwenhuis » Sun Dec 20, 2009 7:56 pm

Asking the question leads to the answer without anybody answering.
The forum works that way too ;-)

Code: Select all
for (i = 0; i < forms[_form].allrelations.length; i++) {
  var table = databaseManager.getTable(forms[_form][forms[_form].allrelations[i]])
  application.output(table.getSQLName() + ' - ' + solutionModel.getRelations(server,table.getSQLName()))   
}


Hans
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands


Return to Methods

Who is online

Users browsing this forum: No registered users and 2 guests

cron