Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by CoopperBackpack

  1. Hello, I have a Submission form DataPage , one of the fields is set to the Calculated value. And I need to display the value from this field in the HTML block. How can I achieve this?
  2. Hello @crionsynx, I am afraid, that it is possible to count distinct values on the Pivot Report only in Totals & Aggregations. You may use Custom formula with the SELECT statement. However, it`s possible to filter results only by the fields that are used as Rows on the Pivot Report. For example: Hope this helps.
  3. Hello @vanderLeest, Please try this code: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { let title = document.querySelector('#cbParamVirtual2').value; let title1 = document.querySelector('#cbParamVirtual3').value; if (title == title1) { document.querySelector('h4').innerHTML="Add your Invoice"; } else { document.querySelector('h4').innerHTML="Add your Invoice and the Financial Statement Report"; } }); </script> The code should work properly if: 1) you have only one <h4> tag on the DataPage 2) Virtual2 and Virtual3 values are present on the DataPage once it is loaded. Feel free to write back in case you have additional questions.
  4. Hello @techguy, Please try to use difference in days between your date field and timestamp. You may set the timestamp to your timezone. Hope this helps.
  5. Hello @DesiLogi, Please try to use the LIKE operator with '%' wildcards. For example: SELECT COUNT (ItemID)FROM _V_Items Where Assigned_To LIKE '%[@authfield:Users_CID_StaffID]%' Hope this helps.
  6. Hello @techguy, You may automatically place the cursor on the first field of the form using standard Caspio feature. Please refer to this screenshot: Hope this helps.
  7. Hello @hmsmorgan, If you use this statement in the Formula field in the table, please try this formula: CASE WHEN [@field:Date_Created_in_Caspio] BETWEEN CONVERT(datetime, '01/08/2020', 101) AND CONVERT(datetime, '01/12/2020', 101) THEN 'Cycle 1' END This should work if the [@field:Date_Created_in_Caspio] field has Date/Time or Timestamp DataType. Please note that the BETWEEN operator is inclusive: begin and end values are included. Hope this helps.
  8. Hello @ttanemori, Since the formula in the Aggregations has the same logic for Totals and groups, please try this JavaScript code. This code replaces the value in the Total Due with the sum of values that you receive in the groups (in your example it summarizes -1700 and -1300). <script type="text/javascript"> document.addEventListener('DataPageReady', sumGroups); function sumGroups() { const totals = []; document.querySelectorAll("td[class*='cbResultSetGroup1LabelCellNumberDate']").forEach(elem => { totals.push(elem.innerText); }); const result = totals.reduce( (accumulator, currentValue) => parseFloat(accumulator) + parseFloat(currentValue) ); document.querySelector('tr[data-cb-aggregation="Aggregate1"] > .cbResultSetTotalsData').innerText = result; document.removeEventListener('DataPageReady', sumGroups); }; </script> Replace Aggregate1 with the Aggregate2, etc. depending on the number of your Aggregate field. Add this code to the Header section on the "Configure Results Page Fields" screen of your DataPage. Do not forget to disable HTML editor before pasting the code.
  9. Hello @Corpcatalog, Try to add this snippet of code to the Header section of your Submission form: <style> div[class^='cbFormBlock'] { align-self: end; } </style> Do not forget to disable HTML editor before pasting the code. Hope this helps.
  10. Hello @DougH, The easiest way to implement this is the following: 1) Add the HTML block on the Configure Results Page Fields screen of your Report DataPage. 2) In the HTML block place a link to your Submission form DataPage and pass the event ID as a parameter. For example: <a href="https://c1aaa111.caspio.com/dp/9fae7000db8d9f6958d84c15b418?Event_ID=[@field:Event_ID#]">Register for this event</a> 3) On the Submission form DataPage receive the Event_ID parameter. Please replace the [@Event_ID] with you local field name. Hope this helps.
  11. Hello @vanderLeest, I would like to add, that when you click the expand button, you will be able to add a table: It is possible to select the number of columns and rows, adjust border size, alignment, etc. And when the table is added, you may click the right mouse button to have access to the Table and Cell Properties. Using these properties you may style the table as you like.
  12. Hello, I have created a Submission form that has a field to upload files. Is it possible to get the file size and to submit this value to the table? Any help would be greatly appreciated.
  13. Hello @FishTacos, Since I am not sure how you store the values, I assume that the time field has the Text(255) data type. 1) In this case, you may try using this formula to calculate miles per hour [@field:Miles]/(((CAST(Substring([@field:Hours],1,2) as float)*60) + CAST(Substring([@field:Hours],4,2) as float))/60) Please note, that this formula works if you store the hour as 2-digit number. So, please use leading zero. For example, 01:00:00. Do not forget to replace the field names with your local names. 2) To calculate pace per mile, please try this formula ((CAST(Substring([@field:Hours],1,2) as float)*60) + CAST(Substring([@field:Hours],4,2) as float))/[@field:Miles] If you provide more details about the field data types, I can offer a more suitable solution.
  14. Hello @MinedRight, I`ve found the similar topic on the Forum regarding the reset button on the different types of DataPages. This code should work fine if you use Submission form. <input type="reset" value="Reset" /> As far as I understand, you use the Report DataPage. In this case, please try to use the code that is suggested in the very last reply in this thread (Posted November 12, 2019). It should work to clear the fields with all DataType data.
  15. Hello, I have deployed my DataPages using the iFrame deployment method. And now I have an issue with my CMS system because of the iFrames. When I go through the link, the scroll needs to go up but it still in the same place. How can I fix this? Thank you in advance.
  16. Hello, I have found this solution https://stackoverflow.com/questions/35942247/how-to-move-placeholder-to-top-on-focus-and-while-typing How can I implement it on Caspio? Thanks
  17. Hello @capsio88, To replicate your formula, please, use the CASE expression with its CASE WHEN THEN ELSE construct in T-SQL. Also, please note that AVG SQL function is available only in the Totals&Aggregations on the Report DataPages and has specific syntax https://howto.caspio.com/datapages/reports/advanced-reporting/totals-and-aggregations/ As a workaround you may sum all required columns and divide them to get the average value. Your first formula should look like this: CASE WHEN [@field:field_1] IS NOT NULL AND [@field:field_2] IS NOT NULL AND [@field:field_3] IS NOT NULL AND [@field:field_4] <=3 THEN ([@field:field_1]+[@field:field_2]+[@field:field_3])/3 ELSE ' ' END
  18. Hello @jorgeorbit, There can be different reasons for such an error. Please make sure that you use absolute (not relative) paths for URLs and the “Time out & Redirection” under “Advanced Settings” of your authentication is set to the existing URL. You may follow the related article to learn more about the supposed reasons: https://howto.caspio.com/troubleshooting/errors-and-messages/error-60025/ Hope this helps.
  19. Hello @Umbie, You have 2 options: 1. First create relationships between tables and then build a View based on these tables. In this case when you create a View, on the View Properties screen, the relationships are build automatically. 2. If relationships are not set up and you join tables in a View, you should choose the fields to join tables manually on the View Properties screen. Also, please note that you may find some helpful features only in the Relationship Settings. For example, Enforce Referential Integrity between parent and child table, Display value instead of the ID on the DataPage level. Here is the article about the Relationship Settings https://howto.caspio.com/tables-and-views/relationships/relationship-settings/ Hope this helps.
  20. Hello @Jason200, You may try following these steps: 1. Create a new field in the table to concatenate the PART field and the DETAIL field. To do this, please use formula DataType for the field with a simple formula: [@field:PART]+[@field:DETAIL]. Let`s say the name of the formula field is Concat_Field 2. Go to the DataPage -> Configure Results Page Fields. Please add a Calculated field, which you can name TOTAL. Please try this formula for the Calculated field: SELECT TOP 1 SUM(QUANTITY) FROM table_name WHERE Concat_Field = target.[@field:Concat_Field] Please, replace "table_name" with your table name and check the field names. For the better visualization you may use the Data Grouping option on the DataPage (if it is available in your plan). You may refer to the article: https://howto.caspio.com/datapages/reports/advanced-reporting/data-grouping/ I hope that this information is helpful.
  21. Hello @roattw, In the formula, in the Count function the parameter name is used now: [@Attending]. Please, try to use the field name, not the parameter name. So, the formula should be the following: SELECT Count([@field:Attending]) FROM tbl_mytablename WHERE [@field:Attending]="1" I hope this helps.
  22. Hello @AnisDuncan, You may find related posts on the Forum . Please, follow this links to articles:
  23. Hello @Elderberg, Please, try to add the addEventListener() method to your code. Also, change the comparison in the IF condition to this one: Flag == 'Yes'. The code example: <div id="mydiv[@field:CMP_ID2]"> </div> <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { var Flag = "[@field:YesNo^]"; if (Flag == 'Yes'){ document.getElementById("mydiv[@field:CMP_ID2]").innerHTML = "X" ; } else{ document.getElementById("mydiv[@field:CMP_ID2]").innerHTML = "Y" ; } }) </script> I hope this information will be helpful.
  • Create New...