Skip to main content
July 18, 2024
Question

Update constant smart service Invalid Cast: Cannot cast from type 'Document' to type 'Content Constant'

  • July 18, 2024
  • 5 replies
  • 0 views

I am getting the error:

Details:  Invalid Cast: Cannot cast from type 'Document' to type 'Content Constant' (Data Inputs)

When trying to replace the constant contents, which is a constant that is a list of Documents. How do I fix?

It doesn't work for replace version yes nor no. 

5 replies

davidj137213
July 18, 2024

Did you have this in mind when included the smart service in your process?

ginao0001Author
July 18, 2024

Not sure what tab it is referring to, but I clicked the edit button and manually wrote out the constant. 

mikes0011
Brainy
July 18, 2024

As David indicated - for the smart service to work, you have to select the constant from the picker.  I'm not sure if there's any way to do it via the expressionable editor (which is what you probably did) which would work.  The problem this creates is, when the process goes to update the constant, instead of seeing a *reference to the constant* (which you'd get from the constant picker), instead it's evaluating the constant and returning its value - hence your error message.