Exercise 24.4 in Appian Community Edition

Hi support,

 

i’m following developer path training in Appian and working with Appian Community Edition. While doing exercise 24.4 Build an Application_ Step-by-Step 5.pdf 

in the part of exercise where you configure the column list.

 

 

I followed instructions but if I insert the code above this error pops out.

 

 

Tks for any support or hint

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Actually i put my record type reference ... 

    if( a!isNullOrEmpty(
    fv!row['recordType!{aa4ce38f-1a9d-4827-af51-e2ccb80a2c8b-w2474as}W2474AS Vehicle.fields.{8b9b140f-deaf-4ca3-8066-1c4624cda5ea-w2474as}image']
    ),
    a!EXAMPLE_DOCUMENT_IMAGE(),
    fv!row['recordType!{aa4ce38f-1a9d-4827-af51-e2ccb80a2c8b-w2474as}W2474AS Vehicle.fields.{8b9b140f-deaf-4ca3-8066-1c4624cda5ea-w2474as}image']
    )

  • 0
    Certified Senior Developer
    in reply to antonios855139

    can you show your grid code please

  • {
    a!gridColumn(
    label: "VIN",
    sortField: 'recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{5c8fb76e-a709-41b6-ba8d-4b6df2a5328f}vin',
    value: a!linkField(
    links: {
    a!recordLink(
    label: fv!row['recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{5c8fb76e-a709-41b6-ba8d-4b6df2a5328f}vin'],
    recordType: /*<add record type reference here>*/ 'recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle',
    identifier: fv!identifier
    )
    }
    )
    ),
    a!gridColumn(
    label: "Make",
    sortField: 'recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{d5f04165-440d-42eb-9933-c7a124a6f6c4}make',
    value: a!defaultValue(fv!row['recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{d5f04165-440d-42eb-9933-c7a124a6f6c4}make'], "–")
    ),
    a!gridColumn(
    label: "Model",
    sortField: 'recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{8e80af0d-a875-47aa-8231-7b197cb43fc4}model',
    value: a!defaultValue(fv!row['recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{8e80af0d-a875-47aa-8231-7b197cb43fc4}model'], "–")
    ),
    a!gridColumn(
    label: "Year",
    sortField: 'recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{8bad8794-74af-448f-b993-260e9a2b7d34}year',
    value: a!defaultValue(fv!row['recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{8bad8794-74af-448f-b993-260e9a2b7d34}year'], "–"),
    align: "END"
    ),
    a!gridColumn(
    label: "Next Maintenance Date",
    sortField: 'recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{2a791f61-c783-4789-9e32-765d0e51936d}nextMaintenanceDate',
    value: a!defaultValue(fv!row['recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{2a791f61-c783-4789-9e32-765d0e51936d}nextMaintenanceDate'], "–"),
    align: "END"
    ),
    a!gridColumn(
    label: "Added By",
    sortField: 'recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{7cdf18f6-43e4-4330-84d8-2455475a9d1c}addedBy',
    value: rule!W2474SA_FormatDisplayName_bis(user:fv!row['recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{7cdf18f6-43e4-4330-84d8-2455475a9d1c}addedBy'])
    ),
    a!gridColumn(
    label: "Mileage Category",
    sortField: 'recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{91a4b61b-53c2-416d-adc7-eb3c4f90826c}mileageCategory',
    value: fv!row['recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{91a4b61b-53c2-416d-adc7-eb3c4f90826c}mileageCategory'],
    align: "START"
    ),
    a!gridColumn(
    label: "Image",
    sortField: 'recordType!{8a9738bb-dd78-47a9-ab5d-35837741eaa9}W2474SA Vehicle.fields.{b15d91fc-012e-4f8f-9a65-4d873c922673}image',
    value: a!imageField(
    images: a!documentImage(
    document: if( a!isNullOrEmpty(
    fv!row['recordType!{aa4ce38f-1a9d-4827-af51-e2ccb80a2c8b-w2474as}W2474AS Vehicle.fields.{8b9b140f-deaf-4ca3-8066-1c4624cda5ea-w2474as}image']
    ),
    a!EXAMPLE_DOCUMENT_IMAGE(),
    fv!row['recordType!{aa4ce38f-1a9d-4827-af51-e2ccb80a2c8b-w2474as}W2474AS Vehicle.fields.{8b9b140f-deaf-4ca3-8066-1c4624cda5ea-w2474as}image']
    )

    ),
    size: "GALLERY"
    ),
    align: "CENTER"
    )
    }

  • 0
    Certified Senior Developer
    in reply to antonios855139

    Hi   could you try this code by the replacing your record type in the given code 

    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"

          ),

  • tried but same error 

    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 'isnull' parameter 1 [line 54]: W2474SA Vehicle must be indexed by its corresponding record type fields or relationships

  • 0
    Certified Senior Developer
    in reply to antonios855139

    Is your record having any data ? Like is your record data consists of document ids ? Or is your record empty? In your database are there any rows ? Or empty 

  • I've looked into the cloud and AS_VEHICLE has 44 rows with data. Image field is null in all rows

  • 0
    Certified Senior Developer
    in reply to antonios855139

    You need to have document ID in that field, the error says that, since values are null it is unable to find the image 

  • Tks for the help Abhishek. 

    I understand what you are saying, but the exercise tries to put a condition "if" that should bypass this problem. The expression that the exercise give me is to check if the value is null and if it is so, put the default image instead. So i dont understand where the problem is. 

    From the execise book <<

    if( a!isNullOrEmpty(
    fv!row[recordType!W#SA Vehicle.fields.image]
    ),
    a!EXAMPLE_DOCUMENT_IMAGE(),
    fv!row[recordType!W#SA 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.

    >>

  • 0
    Certified Senior Developer
    in reply to antonios855139

    Okay, just can you do one thing, you have shared the code of grid, for the grid column image  which you are using, you are having a sortfield, can you remove that sortfield and check?