Jump to content


Caspio Moderator
  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    Alison reacted to arielrobaldo in How to relate a table to itself   
    Thank you Alison!
  2. Like
    Alison reacted to MaraMara in Using Case Statement in Calculated Field   
    Alison, Thank you very much! 
  3. Like
    Alison got a reaction from Katey in Online Store   
    Hi @Katey,

    If you have an account with Caspio, you may request the following application and use it as is:
  4. Like
    Alison reacted to JayDub in Is it possible to query a View in a Calculated Field?   
    Thanks so much @Alison! That worked perfectly.
  5. Thanks
    Alison got a reaction from JayDub in Is it possible to query a View in a Calculated Field?   
    Hi @JayDub,

    If you want to select data from a View, you should add prefix _v_ to the View name. More details can be found here: https://howto.caspio.com/datapages/reports/advanced-reporting/calculations-in-forms-and-reports/

    You can join as many tables in the Select statement in the Calculated field as needed. The syntax is the same as in the SQL. However, it will be easier to refer to the View.
  6. Like
    Alison reacted to tbarjonas in Parameters Picker Contents   
    Thanks, that was the problem. 
    That's embarrassing.  I figured it was something simple.  Oh well, I always learn most through the mistakes.  Now, I know to look for the descriptor after the "Search and Report Wizard."
    I'm sorry to bother you.
  7. Like
    Alison got a reaction from Leon13 in Change color of the column in chart   

    Hi can I change the  color of the column in chart for the blank values. For example, I want the color of the first column (blank) to be color red
  8. Like
    Alison reacted to Hastur in Change color of the column in chart   

    To change the color you need to use additional JS code. It will parse the data in chart and change the color according to name of the column.
    Here is the code:
    <script type="text/javascript"> document.addEventListener('DataPageReady', chartUpdateHandler); function chartUpdateHandler(event) { var cleaner = function(interv) { clearInterval(interv); } let interv = setInterval(() => { if (!!Highcharts) { const options = Highcharts.charts[0].series[0].data; let data = []; options.forEach(option => { let localData = {}; localData.y = option.y; localData.name = option.name; if(option.name === "(blank)") { localData.color = '#ee5921'; } else { localData.color = '#3186AD'; } data.push(localData); }) Highcharts.charts[0].update({ series: { data: data } }); cleaner(interv); } }, 200); } </script> You need to insert this code into the Header of the report DataPage. Do not forget to disable the HTML editor.
  9. Thanks
    Alison reacted to guardmetrics in Move submit button to right of field instead of below form   
    Nevermind! I figured it out.  Will post for reference for others:
    .cbSearchButtonContainer {
     display: none !important;
  10. Thanks
    Alison reacted to mbdiener in User Authentication Failed   
    Thanks for your reply. Your comments regarding the Authentication configuration made me realize what the problem was. The authentication Caspio method automatically chose the UserID and password for authentication. However, the UserID was the autogenerated unique record number, not the Username, which I was inputting. I changed the method to use the Username and all worked fine!
    Thanks again for answering.
  11. Thanks
    Alison got a reaction from Vitalikssssss in Add a value from the Dropdown field to the Text field   
    Hi @Vitalikssssss,

    You should add two text fields to the Selected fields on the Submission form and one of them make a Dropdown form element. After that create a Header and Footer element and past the following code into the footer after disabling HTML edotir:

    <script> document.addEventListener("DataPageReady", function() { let dropdown = document.getElementById('InsertRecordname'); let textfield = document.getElementById('InsertRecordnumber'); let change = function() { textfield.value = this.options[this.selectedIndex].value; }; if (document.addEventListener !== undefined) { dropdown.addEventListener('change', change, true); } else if (document.attachEvent) { dropdown.attachEvent('onchange', change); } else { dropdown.onchange = change; } }); </script> InsertRecordname and InsertRecordnumber are the ids of the text fields elements  where InsertRecordname is set to the Dropdown form element.


  12. Thanks
    Alison reacted to JaredL in How do you change option background color of clicked option in drop-down?   
    Thank you Alison this is great help.
  13. Thanks
    Alison got a reaction from Vitalikssssss in Set a placeholder to the Multiselect Dropdown form element   
    I want to share a solution on how to set a  placeholder to the Multiselect Dropdown form element on the search form.
    You should put the following code into the Footer after disabling HTML Editor on the advanced tab:
    <script> document.addEventListener('DataPageReady', function () { document.querySelector('[id^="ComboBoxValue"]').setAttribute("placeholder", "Your value for the placeholder"); }); </script>
  14. Thanks
    Alison got a reaction from deemuss in Values cannot be submitted due to a data restriction.   
    There are some cases when the error "Values cannot be submitted due to a data restriction" occurs:

    1.  When there is a Formula Field in the table.  Make sure that the formula in the Formula fields should not contain empty values and all the values should be cast to the one type. To make the formula correct you should wrap the fields to the isnull function to replace the Null value with 0.  Also, when you perform any operations with the different data types you should convert them to the same one.

    2.   When the referential integrity is broken. Please follow this link for more details:  https://howto.caspio.com/tables-and-views/relationships/relationship-settings/
    3. When tables or datapages are corrupted after making some changes, for example, modifying the table design, adding/removing relationships, datatype changes, etc.  These actions lead to some missing constraints in the table and seem to cause an issue at the server level. You can try export and import back the datapage with dependencies.
  15. Like
    Alison reacted to kpcollier in JS Animation to Flip Image   
    Cancel that. I changed the classes to IDs with a number and changed QuerySelectorAll to ElementById and it all works. Thanks again Alison.
  16. Like
    Alison got a reaction from kpcollier in JS Animation to Flip Image   
    Hello @kpcollier,

    You should add a variable declaration for the img tag. This will allow you to assign styles to it.

    Feel free to use the following JS code:
    function Displayer(n) { var check = document.getElementById('Section' + n); var image = document.querySelectorAll('.estimatebuttons' + n)[0]; if (check.style.display == 'none') { check.style.display = 'inline'; image.style.transform = 'rotate(180deg)'; } else { check.style.display = 'none' image.style.transform = 'rotate(0deg)'; } }  
  17. Sad
    Alison got a reaction from kpcollier in Work Around Solution for Printing Reports   
    Hello @kpcollier,

    PDF download option is included into the Build plan and higher. Please follow this link for more details: https://www.caspio.com/pricing/basic-plans/

    Also, you can use WebMerge Zapier integration with Caspio: 
  18. Thanks
    Alison got a reaction from Vitalikssssss in Add a checkbox "Remember me"   
    Hi @deemuss,

    Yes, it can be done with the jQuery code.  You should go to the editing Authentication screen, where there are two fields - Name and Password, for example. Add header and footer element and HTML block.

    Put the following code to the header element for jQuery library: 
    <script src="https://code.jquery.com/jquery-1.9.1.js"></script> Put the following code into the HTML block for the "Remember me" checkbox:
    <label class="checkbox"> <input type="checkbox" value="remember-me" id="remember_me"> Remember me </label>
    Put the following code into the footer element for the jQuery code:
    <script> $(function() { if (localStorage.chkbx && localStorage.chkbx != '') { $('#remember_me').attr('checked', 'checked'); $('#xip_Name').val(localStorage.usrname); $('#xip_Password').val(localStorage.pass); } else { $('#remember_me').removeAttr('checked'); $('#xip_Name').val(''); $('#xip_Password').val(''); } $('#remember_me').click(function() { if ($('#remember_me').is(':checked')) { // save username and password localStorage.usrname = $('#xip_Name').val(); localStorage.pass = $('#xip_Password').val(); localStorage.chkbx = $('#remember_me').val(); } else { localStorage.usrname = ''; localStorage.pass = ''; localStorage.chkbx = ''; } }); }); </script> where  #xip_Name is an ID for the Name field and #xip_Password is an ID for the Password field.

    Please see this screenshot for better understanding:

  19. Thanks
    Alison got a reaction from Hencoco in Date/Time Field Issue   
    Hello @Hencoco,

    You should put the exact value into the Default Value field, for example,  04/12/2019. Please see the screenshot below:

  20. Like
    Alison reacted to Corpcat in move submit button inline   
    Thank you Alison
  21. Like
    Alison got a reaction from Corpcat in move submit button inline   
    Hi @Corpcat,

    Yes, you can.
    You should put the following code for your custom button to the HTML element in the Authentication :
    <input type="submit" name="xip_datasrc_Customer" id="xip_datasrc_Customer" value="Login" class="cbLoginButton">
    And hide the original button using the following code in the footer in the Authentication:
    <script> let btn = document.getElementsByClassName("cbLoginButton")[1]; btn.style.display="none"; </script> To put the button inline with the previous field, you should check "  Continue next element on the same line" for the Password field. Please refer to this screenshot:
  22. Thanks
    Alison got a reaction from Vitalikssssss in Hide Columns on Tabular Report When Empty   
    Hi @bbeshlian ,

    Here is a snippet of JavaScript and JQuery code to hide columns if they are empty:
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script> document.addEventListener('DataPageReady', function(e) { let $table = $('.cbResultSetTable:first'); let tbody = $table[0].tBodies[0]; let colsLen = tbody.rows[0].cells.length, rowsLen = tbody.rows.length; let hideNode = function(node) { if (node) node.style.display = "none"; }; for (var j = 0; j < colsLen; ++j) { let counter = 0; for (var i = 1; i < rowsLen; ++i) { if (tbody.rows[i].cells[j].textContent.trim() == '') ++counter; } if (counter == (rowsLen - 1)) { for (var i = 1; i < rowsLen; ++i) { hideNode(tbody.rows[i].cells[j]); } hideNode(tbody.rows[0].cells[j]); } } }); </script> You should put the code above into the Footer element on the Search and Report Wizard - Configure Results Page Fields.
  23. Like
    Alison got a reaction from jasonkaeb in Grid edit by default   
    @jasonkaeb You are welcome! I was glad to help you.
  24. Thanks
    Alison got a reaction from JeanPierre in Save report to a record   
    Hi Jean-Pierre,

    You can create Reports DataPages downloadable in PDF Format and then convert PDF to DOC.  PDF Generator is available starting from Performance plan.
    1) Open your DataPage in edit mode. Go to the results or details page configuration step.
    2)  Insert Header/Footer (if you don’t already have one), and view the header in Source. Paste the code below into the header. It will create an icon for the PDF download:

    <a href="[@cbprotocol][@cbbridgeservername]/PDFGen.aspx?AppKey=DPAppKey" target="_blank"><img
    src="[@cbprotocol]static.caspio.com/bridge/images/PDF_print.png" alt="Download as PDF"

    3)Replace"DPAppKey" with the AppKey of your DataPage.

    Also, you can use one or more of the formatting parameters to achieve a more custom look and feel in your PDF files.
  • Create New...