Documents Image upload issue

Hi All,

I am going through Appian Developer course, where I am trying to work on 

Design Record Types: Model and Configure Your Data

while following below steps

Follow the steps below to format the Image column.

1. Under Columns, click Image.

2. Under Display Value, click DISPLAY OPTIONS.

3. Select DOCUMENT IMAGE.

4. Under Display Value, click Image.

5. Under Images, click Document Image.

6. Under Document, click the a!EXAMPLE_DOCUMENT_IMAGE() to edit as expression.

● In the Expression Editor, delete all text, and enter the following expression:

if(
a!isNullOrEmpty(
fv!row[recordType!WSA Vehicle.fields.image]
),
a!EXAMPLE_DOCUMENT_IMAGE(),
fv!row[recordType!WSA Vehicle.fields.image]
)

This expression checks whether the image field is null. If it is null, it displays an example document image. The example document image is displayed for existing vehicle data; you will be able to upload vehicle images when you add new vehicles to the fleet in later exercises.

● Click OK

I am facing the below error which is stopping me to proceed. I am just going through the steps provided above in Appian Academy.

Expression evaluation error: Syntax error. Details: Expression evaluation error at function a!isNullOrEmpty parameter 1 [line 3]: Invalid index operator ''vehicle'' (expecting comma).

Can any one please help me in resolving this issue. Thanks in advance.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hi  , 
    The code snippet looks okay to me. However, can you try putting here entire code which is there inside a!gridColumn(), may be that can help have a better look. 

  • Hi  , as suggested by you I have kept entire code in a!gridColumn(), Still I face the issue as below:

    For better understanding of the error, I am pasting the error below:

    Error Evaluating UI Expression

    Expression evaluation error at function a!gridField_23r3 [line 51]: A grid component [label="null"] has an invalid value for "columns". A grid column [label="Image"] has encountered an error. Expression evaluation error at function a!gridColumn [line 58]: Invalid number of parameters, function 'if' a minimum of 3 parameters (condition,true,false), passed 2.

  • Hi  
    There are few points to be highlighted- 
    1. If () function expects 3 parameters, you have just provided 2. 
    2. The images will not be shown directly the way you have shown inside a grid column. 
    3. If you are directly putting the code in document image, then you can only copy the subset of the code which I have mentioned.  (only the if() function part)
    The below code applies for entire grid column.

    Just for your reference- try replacing the code the way I have written, it will work. 
    Note- Remember to change the record type AA vehicle with your own record type as used. 

    a!gridColumn(
            label: "Image",
            helpTooltip: "Test images may not represent the actual vehicle",
            value: a!imageField(
              images: a!documentImage(
                document: if(
                /*Replace with your record type*/
                  isnull(
                    fv!row['recordType!{99b0bb09-e2c0-4f75-a70b-26f247e2d095}AA Vehicle.fields.{c7d0b689-e98f-4cb7-8477-6c63943b30a0}image']
                  ),
                  a!EXAMPLE_DOCUMENT_IMAGE(),
                  /*Replace with your record type*/
                  fv!row['recordType!{99b0bb09-e2c0-4f75-a70b-26f247e2d095}AA Vehicle.fields.{c7d0b689-e98f-4cb7-8477-6c63943b30a0}image']
                )
              ),
              size: "SMALL"
            ),
            align: "CENTER"
          ),


  • Hi  ,

    Thanks for the reply , I have used the same code provided by you and made changes in record type. I see a new error popped up.

    Error Evaluating UI Expression
    Expression evaluation error at function a!gridField_23r3 [line 51]: A grid component [label="null"] has an invalid value for "columns".
    A grid column [label="Image"] has encountered an error. Expression evaluation error at function a!gridColumn [line 58]: A grid component [label="null"] has an invalid value
    for "columns". A grid column [label="Image"]
    has encountered an error. Expression evaluation error at function a!imageField [line 61]: User Does Not Have Rights to Perform this Operation

  • This means the actual error is sorted out, but you're facing issues in accessing the image. 
    I am not sure which environment you're using ( the old CE or the beta environment).
    You can check whether you have access to document and folder or not.

    Additionally, similar issue can also be referred by the following link:
    https://community.appian.com/discussions/f/new-to-appian/34579/step-by-step-5---format-the-image-column

  • I am also facing the same error at the same place with the latest Community Edition given by Appian. I've gone through the steps mentioned in the advised link but there is no use.

    Predominently there are 2 kinds of issues are coming up.
    Type 1:
    Expression evaluation error at function a!imageField [line 5]: The image at index 1 in an image gallery component [label=""] has an invalid value for "document". "document" must not be null.

    Type 2:
    Expression evaluation error at function a!gridColumn [line 5]: A grid component [label="null"] has an invalid value for "columns". A grid column [label="Image"] has encountered an error.
    Expression evaluation error at function a!imageField [line 8]: User Does Not Have Rights to Perform this Operation


    my doubt is if we have missed out an other steps? something like missed to add vehicle related images to our recordType while creating recordType? or any other folders to be created? do we need to create any default record for exception handling? if so how to create a default record?

  • Hi  ,

    I am using the CE provided in current Appian community . I don't know whether it is new or old.

    I have re-verified the document folder. Where I have provided an image in the document.

    Also , I have followed the link, which is the exact issue i am facing right now.

    So, as per the steps provided from community helper. which I have already followed.

    At the end, It is the issue of accessing (related to rights on the folder). 

    As of now, It is in the view state. Still I am unable to access it.

Reply
  • Hi  ,

    I am using the CE provided in current Appian community . I don't know whether it is new or old.

    I have re-verified the document folder. Where I have provided an image in the document.

    Also , I have followed the link, which is the exact issue i am facing right now.

    So, as per the steps provided from community helper. which I have already followed.

    At the end, It is the issue of accessing (related to rights on the folder). 

    As of now, It is in the view state. Still I am unable to access it.

Children
No Data