Support Article

CaseWhenThenElseEnd function is not working for non-administrato



User used CaseWhenThenElseEnd function as a column in a report definition and used this Report Definition (RD) as a source of the repeat grid in a section.

In a repeat grid cell they have added the property calculated by CaseWhenThenElseEnd function like this:

@@pxDifferenceInDays(.pxCreateDateTime,@@pxCurrentDateTime()) . The grid cell has been chosen as a "Text input" type control.

Error Messages

The reference .@@CaseWhenThenElseEnd(CustomerOrder.CaseID,CustomerOrder.CaseID,.pxRefObjectInsName) is not valid. Reason: unexpected character '@' at position 1, expected start of name

Steps to Reproduce

  1. Private Edit the RD pyGetWorkBasket.
  2. In the RD add a row in the Query tab and use the function builder to refer function: @@pxDifferenceInDays(.pxCreateDateTime,@@pxCurrentDateTime()) which calculates the difference in days between .pxCreateDateTime and .pxCurrentDateTime.
  3. Refer this RD as data source for a Repeat Grid.
  4. In the Repeat Grid refer the function.
  5. Save and Run the section containing the Repeat Grid. 


Root Cause

The issue is in custom configuration. The cell in the repeat grid is chosen as the Text input type control. This caused the issue and the error was thrown.


Apply the following local change to resolve this issue:

Delete the problematic column from the repeat grid and add a new one to show the calculated value like this:

Here the instead of forcing any control type the cell is allowed to inherit the control from the property. 

Published September 2, 2016 - Updated September 21, 2016

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.