CastInvalid (APNX-1-4198-000)

I am receiving the following error on the summary page of a record.

"Error Evaluating UI Expression Expression evaluation error [evaluation ID = WNTC55XX] in rule 'rsr_iai_casesummaryview' at function a!textField [line 10]: Could not cast from Number (Integer) to RSR_IAI_IntakeAssessment. Details: CastInvalid (APNX-1-4198-000)"

All the data types are setup and configured correctly. I am using the following rule to display the summary of record: rule!RSR_IAI_QueryTable(rule!RSR_IAI_CaseSummaryView(rf!intakeID,true,true))  

Everything works well when i test the rule but on the site or tempo it keeps throwing the error. What could be going wrong?

  Discussion posts and replies are publicly visible

Parents
  • Just a guess based on naming, but it seems like your rules should be reversed:

    rule!RSR_IAI_CaseSummaryView(
        rule!RSR_IAI_QueryTable(
            rf!intakeID,
            true,
            true
        )   
    ) 

    The summary view should be the outermost rule since that is the interface that displays; your query is what returns the data to be passed into the interface rule. If that doesn't work, I'd suggest trying them individually to see if they work (i.e. just summary view with no inputs, just query with no inputs). Also, try it in a different interface / expression rule and hardcode your rf! variables to see if they work.

Reply
  • Just a guess based on naming, but it seems like your rules should be reversed:

    rule!RSR_IAI_CaseSummaryView(
        rule!RSR_IAI_QueryTable(
            rf!intakeID,
            true,
            true
        )   
    ) 

    The summary view should be the outermost rule since that is the interface that displays; your query is what returns the data to be passed into the interface rule. If that doesn't work, I'd suggest trying them individually to see if they work (i.e. just summary view with no inputs, just query with no inputs). Also, try it in a different interface / expression rule and hardcode your rf! variables to see if they work.

Children