Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Selectable in Read Only grid

Certified Senior Developer

Hi,

I have a grid fiield which is selectable. I am showing the filtered data in the grid. When the data is filtered the id will vary with row numbers like if id 2 and 5 is shown in first 2 rows it won't match with actual row number and the row is not getting highlighted after selection but the values are getting saved. The row is getting highlighted only when the row number matches the identifier. I have just used foreach loop and added extra parameter row number and mapped with fv!index. I have used this in identifier. The row is getting highlighted now but when there is a large number of data I am facing performance issue due to foreach loop. Is there any alternate way to achieve this ?

 a!forEach(
    items: local!data,
    expression: a!map(
      uin: fv!item.uin,
      uinDescription: fv!item.uindescription,
      totalAmount: fv!item.totalAmount,
      rowCount: fv!item.rowCount,
      rowNumber: fv!index
    )
  )
 /* Grid field code*/
  a!gridField_25r2(
          label: "Exception By UIN",
          data: local!expUin,
          selectionValue: ri!selectedId,
          selectionSaveInto:{
          a!save(
              ri!selectedId,
              append(
                ri!selectedId,
                fv!selectedRows.rowNumber
              )
            ),
            a!save(
              local!deselectedId,
              index(fv!deselectedRows, "rowNumber", {})
            ),
             if(
              rule!AHE_notBlankorEmpty(local!deselectedId),
              a!save(
                ri!selectedId,
                difference(ri!selectedId, local!deselectedId)
              ),
              {}
            ),
          }
  
  

  Discussion posts and replies are publicly visible