This months birthdays

5
I've got a metaobject "person" with attribute "birthdate". How do I build a grid that shows this months birthdays?
asked
3 answers
6

This is not possible with XPath, see Fedor's answer. Because it is only possible to use XPath as data source for the datagrid, you have to create a report with an OQL query as data source.

You can use the following OQL query:

SELECT
    Name AS Name,
    Birthdate AS Birthdate,
    DATEPART(DAY, Birthdate) AS DayOfMonth
FROM Module.Person
WHERE DATEPART(MONTH, Birthdate) = DATEPART(MONTH, '[%CurrentDateTime%]')
ORDER BY DayOfMonth
answered
4

You should define a dataset and model a report pane to show this data.

It is not possible to put the Xpath constraint [Birthdate >= '[%BeginOfCurrentMonth%]'][Birthdate <= '[%EndOfCurrentMonth%]'] on the datagrid. This will only result in a contraint on the months of the current year.

The following microflow expression can also not be used as Xpath constraint on the datagrid: [formatDateTime(BirthDate,'MMM' = formatDateTime('[%CurrentDateTime%]','MMM')]

Probably you should start writing OQL queries to meet your requirements ....

answered
-2

You can set a Xpath constraint on the datagrid as followed:

[birthdate >= '[%BeginOfCurrentMonth%]'][birthdate <= '[%EndOfCurrentMonth%]']

answered