1
0
-1

Hi,

I have two questions.

1) I am joining two tables for a datalist (Person and Request). Request has a date column and several records for the same person. How do I display only the record with the latest request date for that person in the datalist?

2) In table Person there are columns 'Family Name' and 'First Name'. How do I combine (concat) the two columns in a single column 'Name' in the datalist?  

    CommentAdd your comment...

    3 answers

    1.  
      1
      0
      -1

      Hi CF,

      I have attached a simple app that uses JDBC Binder to solve your problem. Please look at the JDBC configuration in the list_request Datalist. This Datalist will display the latest record for each person, while the list_allRequest Datalist will display every single record.

      Hope this helps.
      APP_datalistJoin-1-20210930130544.jwa

      1. CF

        Thank You! Exactly what I was looking for.

      CommentAdd your comment...
    2.  
      2
      1
      0

      Use JDBC Binder instead of advance form binder or form binder and write a mysql query in it

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Just to add on, to concat the 'Family Name' and 'First Name', you don't need to use JDBC Binder to do so. The advance form binder can also achieve the same result by using the Expression Columns Feature. You can find an example in the list_allRequest Datalist configuration from the app that I have attached previously.

        You can find more information regarding this from this link.

          CommentAdd your comment...