Hi,
I am new to Appian and trying to work on an Asset Management Application.
I am getting these two errors while running my Request Asset Process Model.
1) Invalid Cast: Cannot cast from type 'AT_Request' to type 'Boolean' (Data Inputs). Where should I fix the problem?
2) The image at index 1 in an image gallery component [label=“”] has an invalid value for “document”. “document” must not be null. I am having this issue with my image component in all interfaces.
When I test the interface with rule!GetAssetbyID(), the error is fixed but having a problem when running the process model. My rule input takes the value of integer for Image. Is that the problem? I tried todocument and other options in the forum but no luck so far.
Hope I can be helped.
Thanks
Discussion posts and replies are publicly visible
For issue 1, looks like casting problem, means you are passing a value of type CDT into Boolean.
For issue 2 , you need to make sure ,you are not providing null values as document
Can you show the code of image configuration?
Thanks for your response.
I fixed the first problem.
The second one I fixed in the interface but having the problem when running the process model.
!formLayout( label: "REQUEST ASSET APPROVAL FORM", contents: { a!sectionLayout( contents: { a!columnsLayout( columns: { a!columnLayout( contents: { a!textField( label: "REQUESTED ASSET DETAILS", labelPosition: "ABOVE", saveInto: {}, refreshAfter: "UNFOCUS", readOnly: true, validations: {} ) } ), a!columnLayout( contents: {} ) } ), a!imageField( label: "Image", labelPosition: "ABOVE", images: { a!documentImage( ri!assetinput['recordType![AT Asset Management.fields.image] ) },
size: "MEDIUM", isThumbnail: false, style: "STANDARD"
In process model , are you passing record type into rule input?
I checked. Rest of the variables are having the value as the parent. But only Image doesn't have the value.
I used pv!assetinput.image as the value but no luck. That's the case with all my process models. Having problem with Image field.
What can be done?
in the interface you are having document from record type but from process you are passing as CDT. you need to re configure your image field , something like this,
a!imageField( label: "Image", labelPosition: "ABOVE", images: { a!documentImage( document: ri!docId )
you can replace "ri!docId" with your ri!assetInput.image and i am assuming "image" field in your cdt is having document id
Thanks. Will try it. My image field in CDT is document.
I tried but getting the same error message.
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!imageField [line 126]: The image at index 1 in an image gallery component [label=""] has an invalid value for "document". "document" must not be null.
Hi , can you please post snap of pv!data?
Is this the one you are asking?
No , I wanted to check whether whether "image" field has any value or not. Looks like it's getting null.