Jump to content

CoopperBackpack

Caspio Guru
  • Posts

    171
  • Joined

  • Last visited

  • Days Won

    25

CoopperBackpack last won the day on October 19

CoopperBackpack had the most liked content!

3 Followers

Recent Profile Visitors

699 profile views
  1. Hello @MatthewK, I am glad if the information I shared is helpful. As I understand, you use the Group-level aggregation option: It works differently. As far as I know, grouped values are considered separate subqueries. And I am afraid it is difficult to understand the reason for the issue in your case without the formula you use. Could you provide me with a formula you use in the Totals&Aggregations?
  2. Hello @ChrisV, It looks like the Yes/No field always has the "Y" value even when the checkbox is not checked: Please try to check the 'checked' attribute instead. If 'checked' is equal to 'true', then checkbox is checked. <script> document.getElementsByName('Mod0EditRecord')[0].onmouseover = function(){ var dropdown = document.getElementById('cbParamVirtual4').value; var vendu = document.getElementById('EditRecordOKpourVendu'); if (vendu.checked === true) {dropdown = "7"; } document.getElementById('EditRecordstage_id').value = dropdown; }; </script> Hope this helps.
  3. Hello @innov2e, I meant that these selectors retrieve the first and the second field of the Pivot table DataPage: tr th:nth-child(-n + 2), tr td:nth-child(-n + 2) And then we can apply the width we want, in my example it is 50 pixels, of course you may specify the width you need. For example, initially I have this layout: When I added the styles to the Header section, I received the following layout: Is it the expected result?
  4. Just an update. If there are blank values and the output should be a concatenated string with line breaks, it works with the following formula: COALESCE(NULLIF([@field:A],'')+char(13), '') + COALESCE(NULLIF([@field:B],'')+char(13), '') + COALESCE(NULLIF([@field:C],'')+char(13), '') + COALESCE(NULLIF([@field:D],''), '')
  5. Hello @zedbee, My only idea is to use a custom formula. If this works for you, you may add Totals&Aggregations, select Custom, and use the SQL statement that sums the PO_Qty grouped by PO_ID. Please note that when you select from the View, you need to add the _v_ prefix before the View name.
  6. Hello @FredFarfadoe, I`ve already replied to a similar question in this post: https://forums.caspio.com/topic/18712-sort-by-pivot-table-calcualted-field-value-why-is-counting-field-occurrences-so-hard/ I also cannot find any workaround, since there is no sorting option on the Pivot table DataPage. For example, on the Tabular Report DataPage, we can specify the default sort order for up to 4 fields. Maybe you want to add your suggestions here https://caspio.uservoice.com/forums/164206-caspio-bridge
  7. Hello @innov2e, You may try to use CSS in the DataPage Header, select first two columns and specify the width for them. For example: <style> tr th:nth-child(-n + 2), tr td:nth-child(-n + 2) { width: 50px !important; } </style> Please disable the HTML editor on the Advanced tab before pasting these CSS properties.
  8. Hello @Billp, You are correct, there is only 1 email template that you can create in the Notification email of the Submission form. You may use Triggered Actions instead (if this option is included in your plan). The Trigger should send emails on Insert:
  9. Hello @Woolf, Do you need to retrieve the substring in the table? If so, you may add a Formula field and try this formula: SUBSTRING([@field:your_field], 0, CHARINDEX('@', [@field:your_field])) Replace the [@field:your_field] with your field name. Feel free to update this thread if you have further questions.
  10. Hello @richs, It seems that it is not possible to restrict the submission of values using standard features. I have a similar workflow in my account and I am using JavaScript to validate the value before submitting it. 1) Let`s say there is a Lookup table like this one: 2) On the Submission form I have the State field that is set to the Dropdown, and the Site field that is set to Cascading AutoComplete: 3) As a first step, we can add the Virtual field that should be set to the Calculated Value. You may hide it using the 'Hide Field' checkbox on the Advanced tab. The statement can be as this one: CASE WHEN [@field:Site] IN (SELECT Site FROM States_Sites WHERE State = target.[@field:State]) THEN 1 ELSE 0 END So, when the user selects Alabama and Site_1 or Site_2, we receive 1, if enters a value other than these two, we receive 0. 3) Then we can add JavaScript code to the Footer section (please disable the HTML editor on the Advanced tab before pasting the code): <script> document.addEventListener('BeforeFormSubmit', function(event) { let virtualField= document.querySelector("input[id*='cbParamVirtual1']").value; if (virtualField === '0') { event.preventDefault(); alert( 'The site is incorrect'); } }) </script> Instead of a standard alert, you may use the so-called SweetAlert for the pop-up. You may learn more via this link https://sweetalert2.github.io/ In this case, the code can be like this: <script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script> <script> document.addEventListener('BeforeFormSubmit', function(event) { let virtualField= document.querySelector("input[id*='cbParamVirtual1']").value; if (virtualField === '0') { event.preventDefault(); Swal.fire( 'The Site name is incorrect', 'Select the Site name from the list', 'error' ); } }) </script> Please replace all field/table names accordingly to your local field/table names. Hope this helps.
  11. Hello @VincenzoCocciolo, I don`t think that App Parameters can be dynamic. If the desired result is only related to the current year and you need to have a text field pre-populated with this value you may try JS solution: Paste the code to the DataPage Footer section. Do not forget to disable the HTML editor on the Advanced tab before pasting the code. Also, replace the field name. <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { const year = new Date().getFullYear(); document.querySelector('#InsertRecordCurrent_Year_field').value = year; //replace Current_Year_field with your field name }); </script> Hope this helps.
  12. Hello @jboder2, Basically, we can use a View to filter records https://howto.caspio.com/tables-and-views/what-are-views/creating-a-view-to-filter-data/ In this example, we need only those records where the date in Timestamp is "Saturday" or "Sunday". My idea is to retrieve the day of the week to use it for filtering records. Weekday is not supported in the Formula field: Therefore, we can use Triggered Actions or Tasks to populate the field with the day of the week. 1) I added the week_day field to the table (data type is Integer) and created this Trigger: 2) If you need to update this field for existing records, then you may use a Task. Because Trigger works on Insert and will populate the field for the newly created records. 3) In the View, Criteria should be the following: In SQL, for the days of the week, 1 stands for Sunday, 7 - for Saturday. 4) Report can be built using this View as a data source. Hope this solution works for you.
  13. Hello @MarkMayhrai, If I got the inquiry correctly, you have a Virtual field and some data source field on the Submission form. When the value in the Virtual field was changed, the value in the source field should be changed too. If the data source field is set to the usual input field, please test this code. Paste it to the DataPage Footer section. Do not forget to disable the HTML editor on the Advanced tab before pasting the code. Also, please double-check the field names and replace them if needed. <script> document.addEventListener('DataPageReady', function (event) { document.querySelector('input[id*="cbParamVirtual1"]').addEventListener("change", myFunction); function myFunction(event) { let virtualField = event.target.value; document.querySelector('#InsertRecordField_name').value= virtualField; //replace Field_name with your local field name document.removeEventListener('DataPageReady', myFunction); } }); </script>
  14. Hello @jboder2, As far as I understand you used this article as a reference https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/how-to-dynamically-change-the-background-of-a-results-page/ The idea here is to have some unique value in the <a> tag, to store it in a variable, and then use this variable to refer to the whole record. Could you replace the [@field:Orders_Coverage_Confirmed] field in the <a> tag with the [@field:Orders_Order_ID] field? This should fix the issue. <a id="visi[@field:Orders_Order_ID]"> <script> var isi = document.getElementById("visi[@field:Orders_Order_ID]"); if('[@field:Orders_Coverage_Confirmed]' == 'Yes'){ isi.parentNode.parentNode.style.backgroundColor = '#0000FF'; } else{ isi.parentNode.parentNode.style.backgroundColor = '#FF0000'; } </script>
×
×
  • Create New...