Datalist table join most recent date and column concat

Confluence User - 26 Sep, 2021

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?  

datalists

4


29 Sep, 2021
confluenceUser
confluenceUser

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

30 Sep, 2021
confluenceUser
1
confluenceUser

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

30 Sep, 2021
confluenceUser
confluenceUser

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.

30 Sep, 2021
confluenceUser
confluenceUser

Thank You! Exactly what I was looking for.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print