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.
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.
Question
CraigSZ
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.
TIA,
Craig
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
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.