application.getMethodTriggerRelationName()

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

application.getMethodTriggerRelationName()

Postby gstein » Tue Aug 31, 2004 7:49 am

This would help me write more generic code.
gstein
 
Posts: 210
Joined: Tue Jul 27, 2004 2:38 pm

Postby jcompagner » Tue Aug 31, 2004 2:32 pm

a method will never be triggerd by a relation.. So can you give an example what you expect in what situation?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby gstein » Tue Aug 31, 2004 3:32 pm

Sorry. Let me try to be more clear.

The application.getMethodTriggerFormName() method is a really great way of getting the name of the form of the element whose event that called the method.

What I would like is the same thing for relations. The application.getMethodTriggerRelationName() would return the name of the relation on which the form of the element whose event that called the method is based.

Or is there some way to get the relation of an existing form now?
gstein
 
Posts: 210
Joined: Tue Jul 27, 2004 2:38 pm

Postby jcompagner » Tue Aug 31, 2004 3:49 pm

so IF the form is showing a related foundset you would like to have the relation name on which that foundset is build?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby gstein » Tue Aug 31, 2004 4:50 pm

Yes. And I guess the table name of the foundset if the form is not based on a relation.
gstein
 
Posts: 210
Joined: Tue Jul 27, 2004 2:38 pm

Postby jcompagner » Tue Aug 31, 2004 8:39 pm

then you then give the table name doesn't make much sense. Because then you don't know if the name is a relation or not.

But if you know if it is a relation and you know the name what would you do with it?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby gstein » Wed Sep 01, 2004 3:04 pm

I would hope to do something like

databaseManager.refreshRecordFromDatabase(forms[myform].[myrel], -1)

instead of:

databaseManager.refreshRecordFromDatabase(forms.people.people_have_addresses_mailing, -1)
gstein
 
Posts: 210
Joined: Tue Jul 27, 2004 2:38 pm

Postby jcompagner » Thu Sep 02, 2004 11:29 am

huh?
But that is something different. We where talking about getting the name of a relation that the form now displayes as its main foundset!
and i that case you just can do this:


databaseManager.refreshRecordFromDatabase(forms[myform].foundset, -1)

then it refreshes that foundset no matter what it is (related or head/main)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby gstein » Thu Sep 02, 2004 11:55 am

Oh. I didn't know that. Thanks!
gstein
 
Posts: 210
Joined: Tue Jul 27, 2004 2:38 pm

Postby LOGIsoft » Wed Apr 11, 2007 12:11 am

I would like to start this thread going again, because I have a form with 35 portals on it, and I would like to capture the relation name once using a single method, instead of writing 35 methods to be able to affect the underlying records behind each portal following a trigger event. Is this at all possible?

TIA,

Ben
Benoit R. Savignac, president
LOGIsoft Consulting inc.
--------------------------------------------------------
Servoy Alliance Network Partner
User avatar
LOGIsoft
 
Posts: 260
Joined: Wed May 24, 2006 3:06 pm
Location: St-Basile-le-Grand (Montreal), Qc, Canada


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 11 guests