Jump to content
  • 0

Update SQL aggregate field in GridEdit mode



Hi all,

I need a total, based on the number of records which have the "Selected" checkbox set to true/checked. The calculated value will be displayed in the header of the form which is only shown to the user in GridEdit mode. At the moment the total is static so when the user checks/unchecks the value in the "Selected" column then the total is not changing.

I have created three calculated fields to try and solve the issue but have a number of problems as follows:

ChkSelected field - this is a SQL query to count the number of records which have "Selected" checked. Total value is correct but it is not changing when the user checks/unchecks records in GridEdit mode.

Total Selected field - this is case statement to show if each record has "Selected" checked or not. The value is correct but when I display it in my header (via field selector) then it only shows the value for one record.

Aggregate field - this sum Total Selected and is set to display above the data but it is not appearing. I'm not sure if that is because I am using a GridEdit form or due to another reason.

I have attached two documents to show what is currently happening.

Document 1 - this shows the datapage when it is loaded. The ChkSelected total is correct and the value for Total Selected is correct for each record. The Aggregate field is not showing

Document 2 - this is after checking a record (and navigating to another record to force the update in GridEdit). The ChkSelected in the table is correct for the updated row but the total in the Header has not changed. The Total Selected value for the updated record is correct.

I would like the ChkSelected total shown in the header to be recalculated & updated when the user checks/unchecks the "Selected" checkbox. I suspect I will need JavaScript fired when the checkbox state changes but I don't know how to "force" the SQL field to recalculate. This would then allow me to have additional checks/formatting based on the total of ChkSelected as I don't believe that "aggregated" fields can be used for this purpose as they do not have IDs (when you inspect the page).

I would appreciate any suggestions on how to resolve the issue.






Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Caspio have confirmed via online chat that aggregates/totals in GridEdit datapages is not possible. It really is disappointing that the GridEdit form lacks basic features and seems to have a number of bugs especially when you contrast the GridEdit datapage that application users experience against the Caspio Bridge grid edit form used to maintain/design tables.  The Bridge grid edit form has a slick interface and operates as expected. The application datapage however changes column widths, has missing functionality and you have to click somewhere else on the record to force the changes to update which results in a very poor overall user experience.

I was asked to submit a feature request through Ideabox but there doesn't appear to be any active management of Ideabox. The development roadmap shows items from 2017 as under development so I can't see any evidence that the ideas are taken seriously.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...