2Bas van den Broek: stack trace is to long, so i am adding it in the answer:
An error has occurred while handling the request. [User 'ca1' with roles 'CustomerAdmin']
com.mendix.core.CoreException: Exception occurred in action '{"name":"Banking.GetDailyTotalForMonday","currentactivity":{"inputVariableNames":[],"returnVariableName":"DailyTillTotals","caption":"Retrieve DailyTillTotals from database","inputConstants":{"sort":{},"metaObject":"Banking.DailyTillTotals","fromCache":false,"singleObject":true,"xpathConstraint":"[week-from-dateTime(SelectionDate) = week-from-dateTime($Till/SelectionDate)] "},"type":"Retrieve"},"type":"Microflow"}', all database changes executed by this action were rolled back
at com.mendix.core.actionmanagement.CoreAction.c(SourceFile:485)
Caused by: com.mendix.core.CoreException: Exception occurred in microflow 'Banking.GetDailyTotalForMonday' for activity 'Retrieve DailyTillTotals from database', all database changes executed by this microflow were rolled back
at mv.b(SourceFile:257)
Caused by: com.mendix.core.CoreException: d: An exception has occurred for the following request(s):
fk (depth = 0, amount = 1): //Banking.DailyTillTotals[week-from-dateTime(SelectionDate) = week-from-dateTime(1324252800000)]
at hg.b(SourceFile:167)
Caused by: d: An exception has occurred for the following request(s):
fk (depth = 0, amount = 1): //Banking.DailyTillTotals[week-from-dateTime(SelectionDate) = week-from-dateTime(1324252800000)]
Caused by: d: Exception occurred while retrieving data. (SQL State: 42883, Error Code: 0)
Caused by: org.postgresql.util.PSQLException: ERROR: function pgcatalog.timezone(unknown, bigint) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Position: 1612
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at w.a(SourceFile:322)
at w.a(SourceFile:215)
at w.a(SourceFile:165)
at w.a(SourceFile:154)
at n.a(SourceFile:43)
at dq.a(SourceFile:200)
at dq.a(SourceFile:158)
at dq.a(SourceFile:86)
at du.a(SourceFile:67)
at l.a(SourceFile:45)
at a.a(SourceFile:243)
at gW.b(SourceFile:124)
at gW.a(SourceFile:65)
at gS.a(SourceFile:60)
at gS.executeAction(SourceFile:20)
at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:48)
at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:434)
at hg.b(SourceFile:155)
at com.mendix.core.Core.retrieveXPathQuery(SourceFile:820)
at lE.a(SourceFile:86)
at mv.a(SourceFile:72)
at mu.executeAction(SourceFile:102)
at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:48)
at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:434)
at hg.b(SourceFile:155)
at com.mendix.core.Core.execute(SourceFile:199)
at fZ.execute(SourceFile:183)
at iD.a(SourceFile:306)
at iD.a(SourceFile:235)
at iD.processRequest(SourceFile:179)
at iG.a(SourceFile:71)
at com.mendix.core.MxRuntime.processRequest(SourceFile:842)
at com.mendix.m2ee.server.handler.RuntimeHandler.handle(RuntimeHandler.java:43)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
at org.eclipse.jetty.server.Server.handle(Server.java:334)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1007)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:747)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:209)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:462)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
at java.lang.Thread.run(Thread.java:662)
Lukas
This is a limitation in the Mendix date part functionality. Please fill in a ticket in the Support Portal.
At this moment, you can only use date part functions (like week-from-dateTime) with an attribute (like SelectionDate) or a system variable (like '[%CurrentDateTime%]'). Attribute values (like $Till/SelectionDate) do not work.