acces to array items like with Where fonction
Hello to all,
This new forum made me want to share something with you .
I chose this code which allows to find elements in a table by filtering as we would do with the Where function of Select.
var myTable := ["Jacques", "Marie", "Leon", "Nadine", "Marie-Claire", "Sylvain"];
myTable[like "Marie"]
Copy
result of formula :
45 replies
-
Ok, so I'm trying to remove one array from another.
let array1 := [1, 2, 3, 4, 5]; let x := [3, 1]; array1[this != x]
Doesn't return 2,4,5
If x = 3 (a single digit) then it works).
I'm obviously missing something here.
Thanks in advance for any help.
-
I'm obviously not getting the logic behind all this so I'm putting this out there.
Here is my code:
let xH1 := allhito1; let xH2 := allhito2; xH1[var ah1 := this; count(xH2[= ah1]) = 0]
The two fields (allhito1 & 2) are the results of select statements.
Now taking the new formula from Jacques from below I thought it would do the subtraction of xH2 records from xH1, but I get the same number of records in xH1. If change xH2 to hard coded numbers that are in xH1, then they get subtracted properly.
I think I need to add a var section to count(xH2...) but my little brain can't figure it out.
Thanks all for your help.
-
Fred said:
To me the Select Contact where (count(c) = count(a)) says, count the number of items in variable c and check if it is equal to the number of items in variable a.The ‘magic’ comes from the fact that the variable C contains all the records that are in A and in B. so if the number of records in C is equal to the number of records in A, it means that the content of C is equal to the content of A.
Content aside
-
13
Likes
- 2 yrs agoLast active
- 45Replies
- 2244Views
-
9
Following