display only once names in a list of names ?
Hi
Is there a way to display only once names in a list of names ?
EG :
John
John
John
> >John
Peter
Peter
> > Peter
James
James
James
James
> > James
Thank you
26 replies
-
Is this the result of a select statement? If so have you looked at the unique tag?
-
Hi Fred,
What you do you mean by ”the unique tag“ ?
-
for example:
let u := select User
unique(u.'First Name')
What exactly are you doing?
-
Hi
I have not yet tried anything.
I was just asking what could be the way to do it.
Do you suggest I should try that function ?
-
Give it a try and let us know if it does what you want.
-
I get this error :
"A table has not been find User on the line 2, column 6"
-
I tried with a field name ”Ordre” (and not with a field named ”name”) which is not a name.
Do's it matter ?
-
Is the field Ordre in the User table? You can only pull from fields in the User table as that is what you selected from in your first let statement.
-
What do you call ”table utilisateur” ?
If you look at my screen shot you’ll see "Ordre" in the extrem bottom of the list of the fields on the left.
-
-
Yes, by ”name” I mean this names of ordres : Accipitriformes, Tinamiformes, Prodicipédiformes……
I should like to have each displayed one time…
-
EG ”Accipitriformes” Is displayed 8 times…
-
The code I wrote is just an example as I don't know the data model of your database. That means the "User" table needs to be replaced with whatever the name of the table you want to use. Is the Ordre field in the table called "table utilisateur" or is the table called "utilisateur"? Whatever the table name is please put in the appropriate name.
-
What you just posted is a screenshot of your table. Each record has an Ordre field. So in table mode you will always see whatever data in that field for each record.
You can group your records based on that field and it will collapse the table into the different data that is in the Ordre field. When you click on each name it will show all records with that Ordre.
-
Thanks a lot Fred
I replaced user by each of the 2 names of the table.
Wich one is the good one ?
Anyway no one work !
Must on put the table name with quotes ?
Here are 2 screen shots
-
-
You say :
Is the Ordre field in the table called "table utilisateur" or is the table called "utilisateur"?
>The table is called "Oiseaux famille genres espèces"
The ordre field is called "Orde"
-
Since the table name has spaces you need to put it in single quotes.
You need to read my last comment about tables and views. Since you only have one table you will always see all of the data in table view. You should watch the beginning video at Nioxus' YouTube page (https://www.youtube.com/c/NinoxLearning/videos) that talks about how to structure your database. Nioxus also provides weekly Zoom sessions that you can ask Q&A. It is very affordable, their basic membership ($9) provides access to their video archive and support tickets.
-
Hi
Thank you Fred.
I do not understand why that having only one table prevents from using this function.
I already used functions and they worked fine.
Could you please tell me what would be the most suitable learning video that you mention about my particular issue ?
I am French and it not very easy for me to understand all this many technical datas in a foreign langage…
Thanks a lot.
-
I'm not sure if you really need a code to achieve your goal. If I understood you correctly you want the table to be sorted by groups of Data that have the same "Orde" name:
- click on "Orde" and select group (in french probably "grouper")
-
Hi Riccardo.
You are right …
By the way do you know a way to count this groups ?
-
As far as i know it is not possible to count the groups as it is just a simplyfied dipiction of the whole Table. To achieve the count of the group you would have to create a new table just for the different "Orde" groups and link each of your records in your current table with the according "Orde" of the new table. Then it would be possible to assign a fix number to every "Orde" record. I think this is what Fred was refering to.
Another more static approach would be with a choice field with all your different "Orde". You then can dipict the ID number (1,2,3,...,n) in your table overview. The down side is, that when there is a record with a new "Orde" you have to add it manually in the choice field.
-
We covered doing a count of groups approx a week a go with you on one of your other threads. You can't directly count on the group heading itself but you can count any of the field that are included in the table view.
So if you def want count name field - don't have it as the group but instead add a formula field savy Name1 - have it look at name field - then group on that formula field and set the count on your name field like so Custid(formula) is the formula field set to group and Custid is actual field - set to count.
formula in Custid(formula) is simply CustID
Mel
-
only thing that would bother me is are your trying to group on a name in an order ref field. What if there are 2 or more John's
and is this field free typed - is so what about typo's?
-
Sorry forgot to say - Group and count on the same field just gives you a total at foot of the table column not on each group it heading.
So if you want a sub heading count as well - you need to do something I suggested above - (might be other ways tho)
Mel
Content aside
- 3 yrs agoLast active
- 26Replies
- 1489Views