0

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

null
    • Fred
    • 3 yrs ago
    • Reported - view

    Is this the result of a select statement? If so have you looked at the unique tag?

    • saddinsell
    • 3 yrs ago
    • Reported - view

    Hi Fred,

    What you do you mean by ”the unique tag“ ?

    • Fred
    • 3 yrs ago
    • Reported - view

    for example:

    let u := select User

    unique(u.'First Name')

    What exactly are you doing?

    • saddinsell
    • 3 yrs ago
    • Reported - view

    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 ?

    • Fred
    • 3 yrs ago
    • Reported - view

    Give it a try and let us know if it does what you want.

    • saddinsell
    • 3 yrs ago
    • Reported - view

    I get this error :

    "A table has not been find User on the line 2, column 6"F2793E9D-4EDB-462F-932A-B86225DC9020

    • saddinsell
    • 3 yrs ago
    • Reported - view

    I tried with a field name ”Ordre” (and not with a field named ”name”) which is not a name.

    Do's it matter ?

    • Fred
    • 3 yrs ago
    • Reported - view

    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.

    • saddinsell
    • 3 yrs ago
    • Reported - view

    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.

    • saddinsell
    • 3 yrs ago
    • Reported - view
    • saddinsell
    • 3 yrs ago
    • Reported - view

    Yes, by ”name” I mean this names of ordres : Accipitriformes, Tinamiformes, Prodicipédiformes……

     I should like to have each displayed one time…

    • saddinsell
    • 3 yrs ago
    • Reported - view

    EG ”Accipitriformes” Is displayed 8 times…

    • Fred
    • 3 yrs ago
    • Reported - view

    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.

    • Fred
    • 3 yrs ago
    • Reported - view

    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.

    • saddinsell
    • 3 yrs ago
    • Reported - view

    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 shots24B37DF1-4D7F-45B5-85ED-1109EA0F642D

    • saddinsell
    • 3 yrs ago
    • Reported - view
    • saddinsell
    • 3 yrs ago
    • Reported - view

    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"

    • Fred
    • 3 yrs ago
    • Reported - view

    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.

    • saddinsell
    • 3 yrs ago
    • Reported - view

    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.

    • Riccardo.1
    • 3 yrs ago
    • Reported - view

    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")

    • saddinsell
    • 3 yrs ago
    • Reported - view

    Hi Riccardo.

    You are right …

    By the way do you know a way to count this groups ?

    • Riccardo.1
    • 3 yrs ago
    • Reported - view

    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.

    • Mel_Charles
    • 3 yrs ago
    • Reported - view

    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

    Screenshot 2021-03-10 at 17.00.48

    Mel

    • Mel_Charles
    • 3 yrs ago
    • Reported - view

    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?

    • Mel_Charles
    • 3 yrs ago
    • Reported - view

    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
  • 1474Views