Re: Query by Formula Count of Records in Related Table

2019-02-18 Thread Chip Scheide via 4D_Tech
adjust the comparisons (> < = ) as needed in the method
mymethod_related_Rec_Count


mymethod_related_Rec_Count (Min_count;Max_Count)
c_Boolean($0)

relate many([parent_table]field)
$0:=((records in selection(related_table]) = min_count) & 
 (records in selection(related_table]) > Max_Count))
//end

query by formula([parent_table]; 
mymethod_related_Rec_Count(0;$More_Than_Related_Records))



Chip

On Mon, 18 Feb 2019 20:00:08 +, Jim Medlen via 4D_Tech wrote:
> 
> Is there a way to search using Query by formula and Records in selection ?
> 
> In other words is it possible to query for records that have no 
> related records or greater than X etc.
> 
> Thanks,
> 
> Jim Medlen
> Computer & Information Systems
> Functional Devices, Inc.
> j.med...@functionaldevices.com
> phone (765) 883-5538 x 428
> fax (765) 883-4262
> http://www.functionaldevices.com
> 
> This email was transmitted on 100 percent recycled electrons
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Query by Formula Count of Records in Related Table

2019-02-18 Thread Jeremy French via 4D_Tech
Can you use ORDA?

$entity_selection_o:=ds.theTable.query("theOneToManyRelationName.length = 0 OR 
theOneToManyRelationName.length > x")
USE ENTITY SELECTION($entity_selection_o)

Now each record in the current selection for theTable either has either no 
related records or more than x-related records.



> On Feb 18, 2019, at 3:00 PM, Jim Medlen via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> is it possible to query for records that have no related records or greater 
> than X

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Query by Formula Count of Records in Related Table

2019-02-18 Thread Jim Medlen via 4D_Tech

Is there a way to search using Query by formula and Records in selection ?

In other words is it possible to query for records that have no related records 
or greater than X etc.

Thanks,

Jim Medlen
Computer & Information Systems
Functional Devices, Inc.
j.med...@functionaldevices.com
phone (765) 883-5538 x 428
fax (765) 883-4262
http://www.functionaldevices.com

This email was transmitted on 100 percent recycled electrons

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**