Skip to main content
julienc
May 24, 2024
Question

gridField: display export button only when the number is limited

  • May 24, 2024
  • 5 replies
  • 0 views

Hello,

I have a large record type (over 30'000 lines), that I display in a gridfield, with many filters. 

Client needs to export this data to Excel, so I allowed him with the "showExportButton: true". Now some newbies think my system can send them the 30'000 lines, and they click the button... several times. This is costly to the system, breaks performance for everyone, to no avail!

I think there is no way to hide the "export" button when to many records in my recordData set. Or is there?

@Appian, this would be a good feature, wouldn't it? I see the number of lines at the bottom of the page, so it looks easy to the gridfield object to access! Please think about it, or provide guidance to work this around, please [emoticon:6d505171faa4497c85c5ca27290c555d]

5 replies

New Participant
May 24, 2024

 [mention:0b716977d4584b43829e30e4bc418007:e9ed411860ed4f2ba0265705b8793d05]  could you try giving a condition you need here to set true or false? this is in interface where you will be using your record in a read-only grid

julienc
juliencAuthor
May 27, 2024

Hello, I know this option.
The requirement is to make it depend on the size of the data in the grid: if the data count is over a given limit, the button must be hidden.

shubhama926776
Brainy
May 27, 2024

Hello [mention:0b716977d4584b43829e30e4bc418007:e9ed411860ed4f2ba0265705b8793d05] 

I would suggest conditionally checking the record count and hiding or showing the export button based on the result would be better alternative.

a!queryRecordType(
  recordType: /*Add Your Record Type*/,
  pagingInfo: a!pagingInfo(1,1),
  fetchTotalCount:true
).totalCount

शुभम्