Export to Excel in Records working in Tempo but not in Grid

Hi All,

I have a Record type configured in a Grid and the Grid i have configured some set of columns which are coming from the Record Type.

The Export to excel button works in Tempo.

However in the Grid when we configure the Export to Excel button It is throwing an error. 

It says expression evaluation error at function if parameter 2 line 73 invalid symbol found comma.

But when i validate the interface it is working fine.

Can someone help me out.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • thanks and I tried commenting each column and then started to uncomment each grid column. Till the uncommented the below code everything is working fine.

    After this code only the error started to come in the excel

    .Expression evaluation error: Expression evaluation error at function 'if' parameter 2 [line 73]: Invalid symbol found (comma)

    From this  i can rule out my question asked above, The export excel is only looking at the grid Field code.

    Now when i copied the same code in the record list and exported it is working absolutely fine.

    I also removed the richtext Field and called only the fv!row[record]s.fields.orgPosition, It exported. it is only getting this error only at the richtext Display field.

    Not sure where is the error. Can you please help. 

    a!gridColumn(
    label: "Org - Position",
    sortField: 'recordType!{d806002b-c5b8-4f1f-b67e-f5ffa63826a4}s.fields.{orgPosition}orgPosition',
    value:
    a!richTextDisplayField(
    value: {
    a!richTextItem(
    text: fv!row['recordType!{d806002b-c5b8-4f1f-b67e-f5ffa63826a4}s.fields.{orgPosition}orgPosition'],
    color: if(
    a!isNullOrEmpty(
    fv!row['recordType!{d806002b-c5b8-4f1f-b67e-f5ffa63826a4}s.{updatedFields}updatedFields']
    ),
    "STANDARD",
    if(
    contains(
    trim(
    split(
    fv!row['recordType!{d806002b-c5b8-4f1f-b67e-f5ffa63826a4}s.fields.{updatedFields}updatedFields'],
    ";"
    )
    ),
    "orgPosition"
    ),
    "#FFBF00",
    "STANDARD"
    )
    ),
    style: if(
    a!isNullOrEmpty(
    fv!row['recordType!{d806002b-c5b8-4f1f-b67e-f5ffa63826a4}s.{updatedFields}updatedFields']
    ),
    "PLAIN",
    if(
    contains(
    trim(
    split(
    fv!row['recordType!{d806002b-c5b8-4f1f-b67e-f5ffa63826a4}s.fields.{updatedFields}updatedFields'],
    ";"
    )
    ),
    "orgPosition"
    ),
    "STRONG",
    "PLAIN"
    )
    )
    )
    }
    ),
    width: "NARROW_PLUS"
    ),

  • Just to highlight if this helps that my first column in the grid is a tag field. which is also with colors when exported it just exported as a plain text.

  • 0
    Appian Employee
    in reply to harshav

    If that is your exact code, something seems wrong about your record field references. You have two different ways you're currently referencing your fields:

    'recordType!{d806002b-c5b8-4f1f-b67e-f5ffa63826a4}s.{updatedFields}updatedFields'

    'recordType!{d806002b-c5b8-4f1f-b67e-f5ffa63826a4}s.fields.{updatedFields}updatedFields'

    I believe the second of these is the correct one because it includes "fields" between the record type UUID and the field name. Can you try to update these record fields references and see if that fixes your issue?

  • Hi I did check the code probably its the copy paste issue and i still tried by saving it as fields.updatedFields. but still it is throwing me the same error. Not sure what is the issue. Any other thoughts pls

  • Hi and i did change my query for a one grid column like this and tried and it worked, but

    i replaced my contains parameter with search and tried and it worked. But why is contains not working i am not able to figure it out. Any thoughts on this please.

    a!gridColumn(
    label: "Org - Position Desc",
    sortField: 'recordType!{d806002b-c5b8-4f1f-b67e-f5ffa63826a4}s.fields.{orgPosition}orgPosition',
    value:
    a!richTextDisplayField(
    value: {
    a!richTextItem(
    text: fv!row['recordType!{d806002b-c5b8-4f1f-b67e-f5ffa63826a4}s.fields.{orgPosition}orgPosition'],
    color:
    if(search("orgPosition",fv!row['recordType!{d806002b-c5b8-4f1f-b67e-f5ffa63826a4}s.fields.{updatedFields}updatedFields'])>0,


    "#FFBF00",
    "STANDARD"
    ),

    style:
    if(search("orgPosition",fv!row['recordType!{d806002b-c5b8-4f1f-b67e-f5ffa63826a4}s.fields.{updatedFields}updatedFields'])>0,
    "STRONG",
    "PLAIN"
    )

    )
    }
    ),
    width: "NARROW_PLUS"
    ),

  • 0
    Certified Lead Developer
    in reply to harshav

    In the past, I have been in situations in which I had an error and while trying to solve it, I change too many things at the same time. At the end I had working code, but could not really tell what the initial problem was.

    In the meantime, I made it a habit to investigate and improve my code after I got it working. Then I try to understand what the initial problem was and why I came to a certain conclusion in the first place.

    TLDR: Both, search and contains should work.

  • 0
    Certified Associate Developer
    in reply to harshav

    Yeah For me it was concat() function which concatenated two record fields ,that was failing the export grid to excel, I just removed that function and used "&" instead of it, which eventually resolved it.