Logical Operators for Relationships

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

Logical Operators for Relationships

Postby rafig » Tue Apr 23, 2019 5:49 pm

Hi
I find myself in need of filtering a tab panel, but I want to do it based on one column having one value OR another value (or even another).
Currently, when you define a relationship, each line is AND'ed.
It would be nice to have a way to change the linking of the lines to allow 'OR' as well.
I guess the UI would have to be an extra column in the relationship dialog that defaults to 'AND' but you could change to 'OR' and the OR would be between that line and the next??

(I know that I could work around this by having a numerical values for the column and use globals & >= and <= lines, but I just want to be able to list some text values...)
[To define my example, I have a 'Notes' table related to 'Clients' and there is a column 'note_type' with values like email/phone/post/label and I want to create a relationship like
Code: Select all
client -> notes
id = client_id
globals.post_text LIKE note_type OR
globals.label_text LIKE note_type
so that it only shows notes that are 'post' or 'label' for that client
if there is some other way of doing this easily, please let me know ;-) ]

Otherwise, would this feature be possible??
Thanks
Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Logical Operators for Relationships

Postby rgansevles » Fri May 17, 2019 10:48 am

Rafi,

You could use the Query Builder, either load the foundset with it or use the new foundset filter param feature where you can use the Query Builder.
You can create an OR-condition and apply it as a filter or query to your table panel foundset.

A filter cannot be applied to a related foundset, so you would have to make a copy

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: Logical Operators for Relationships

Postby rafig » Fri May 17, 2019 3:34 pm

Thanks Rob, I might try that out.
Ideally, it would be nicer/easier if it was part of the relationship dialog setup ;-)
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 11 guests