Jump to content

TellMeWhy

Caspio Guru
  • Content Count

    132
  • Joined

  • Last visited

  • Days Won

    10

Reputation Activity

  1. Thanks
    TellMeWhy got a reaction from ronbrumbarger in Missing time entry application / finding missing records...   
    Oh, you don't have to! Appreciate it, though! Hope it works for you.
  2. Like
    TellMeWhy got a reaction from Valik in Searching Multiple Unrelated Tables   
    You can still combine all of them in a View, just that it would be OUTER JOIN, nothing is similar.
    You can create another field in all your tables just to store the table name.
    Use View as the Data Source for Reports DataPage, and use Keyword Search.
    https://howto.caspio.com/faq/reports-datapages/how-to-do-keyword-search-across-multiple-fields/
    You might encounter some problems with joining all those tables tho, if you have so much records in each one. Setting up the Reports DataPage will be too much work, as well.
  3. Thanks
    TellMeWhy reacted to jimarch in Don't Allow Prior Dates on Submission Form   
    You absolutely nailed it!!!  It seems so simple now that I actually see it.  I will hang on to this code and example since I'm sure I can find other uses for it going forward.  And also adapt it to some other scenarios too.  Again, thanks so much for the fast solution.
  4. Like
    TellMeWhy got a reaction from jimarch in Don't Allow Prior Dates on Submission Form   
    Not sure if what I understood is correct, but, you can try this, create a Calculated Value, this is to check if the date today is less than 5 or not. If it's 1, user can input any date, if it's 0, only on the current month and later.
    CASE WHEN DATEPART(day, GetUTCDate()) <5 OR (DATEPART(day, GetUTCDate()) >= 5 AND DATEPART(month,GetUTCDate()) <= DATEPART(month, [@field:Date])) THEN 1 ELSE 0 END Script on the footer: (change the number on cbParamVirtual1 depending in your Virtual Field)
    <script> document.addEventListener("BeforeFormSubmit", function(e){ var a= document.querySelector("input[name='cbParamVirtual1']").value; if (a == 0){ e.preventDefault(); alert("Please input Date within or after the current month"); } }); </script>  
  5. Thanks
    TellMeWhy got a reaction from Jess147 in Passing Paramaters Containing Amperand (&)   
    instead of `[@field:name]` , try something like  var qStringVal = document.getElementById("link-[@cbRecordIndex]").textContent ; or  document.getElementById("link-[@cbRecordIndex]").innerText;
    var qStringVal = `[@field:name]`;  
  6. Like
    TellMeWhy got a reaction from jimarch in Ranking Drop Down or Radio Buttons   
    Try this one, just create a var for each dropdown you have, put that var in the two arrays (dropdownarray and valuesarray) , and you're good to go
    <script> document.addEventListener("change", function(event){ var d1 = document.getElementById("cbParamVirtual1"); var d2 = document.getElementById("cbParamVirtual2"); var d3 = document.getElementById("cbParamVirtual3"); var dropdownarray= [d1,d2,d3] var valuesarray=[d1.value, d2.value, d3.value] for(var j=0; j<=dropdownarray.length;j++){ //counter for dropdownarray for (var i=1; i<dropdownarray[j].length; i++) { //counter for options on each dropdown excluding the 'SELECT' option if (valuesarray.indexOf(dropdownarray[j].options[i].value) > -1){ //indexOf returns -1 if value is not in the array dropdownarray[j].options[i].style.display = "none"; } else { dropdownarray[j].options[i].style.display = "block"; } } } }); </script>
     

  7. Thanks
    TellMeWhy got a reaction from LWSChad in Dropdown for Color Choice   
    ahh, I don't know, I believe only radio buttons accept images
     

     
    use img tag for the display . i.e. <img src="https://multimedia.3m.com/mws/media/1484762F/3630-61-slategray-swatch.jpg" alt="test" width="50px"/>

  8. Thanks
    TellMeWhy got a reaction from kpcollier in Details Datapage PDF Reports - Print all matching   
    There's no way to do that. Closest thing is use List or Gallery Reports DataPage and make it look like the Details Page
  9. Thanks
    TellMeWhy got a reaction from Ewens in Divide the sum of the total value of Column A(Field) and the result will be divided by the total sum of column B(Field).   
    Just include the dates in the criteria. On Search Filters, enable the On Exit, and then you can then use these parameters on the WHERE (i.e. WHERE Call_Outcome = 'Sale/Offered' AND DateColumn >= '[@DateParameter1]' AND DateColumn <= '[@DateParameter2]'
  10. Like
    TellMeWhy got a reaction from GoodBoy in Divide the sum of the total value of Column A(Field) and the result will be divided by the total sum of column B(Field).   
    Just include the dates in the criteria. On Search Filters, enable the On Exit, and then you can then use these parameters on the WHERE (i.e. WHERE Call_Outcome = 'Sale/Offered' AND DateColumn >= '[@DateParameter1]' AND DateColumn <= '[@DateParameter2]'
  11. Thanks
    TellMeWhy got a reaction from kpcollier in Remove Special Characters for Input Fields   
    So, I was testing this new HowTo Article I found.
     
    It seems that it will not work for the Inline Insert and Inline Edit, so, I made one, if ever anyone needs it
     
    INLINE INSERT
    <script type="text/javascript"> document.addEventListener('input', function(event) { var x = document.getElementById("InlineAddFIELDNAME").value; document.getElementById("InlineAddFIELDNAME").value=x.replace(/[^a-zA-Z0-9 ]/g, ""); }); </script> I set the event listener to input as the Inline Insert and Edit is not a form, this will, however, PREVENT special characters for being typed or pasted into the input
     
    INLINE EDIT
      <script type="text/javascript"> document.addEventListener("click", function(event){ if(event.srcElement.getAttribute("data-cb-name") == 'InlineEdit'){ document.addEventListener('input', function(e){ var x = document.querySelector('input[name="InlineEditFIELDNAME"]').value; document.querySelector('input[name="InlineEditFIELDNAME"]').value=x.replace(/[^a-zA-Z0-9 ]/g, ""); }); } }); </script>     These both works for me, just reply if you encounter any issues.   Note: I don't know how to restrict just SOME special characters, but, you can search for any regexes that you can use instead of 'replace(/[^a-zA-Z0-9 ]/g, "")'
  12. Like
    TellMeWhy got a reaction from Ewens in How to build Chart base on Pivot Tables or Have a separate table that can calculate/organize data from different table   
    Yeah that's doable. Main Table, is one Table, the 2nd sheet is another Table. Just use Triggered Action, or, if you're importing the data, you will need to use Application Task first to sum up those value you want to sum up.
    Triggered Action is for new entries that will be inserted on the main table, it will get added on the 2nd table (or update the 2nd table's values), if something is updated, as well, you can update the 2nd table through triggered action. You can then use that 2nd table for your Pivot DataPage. Look around the forums or HowTo or Youtube videos about triggered actions, tons of references that can get you started
  13. Thanks
    TellMeWhy reacted to kpcollier in jQuery on the Details Section of a Datapage (Calendar)   
    @TellMeWhy saving the day once again. I greatly, greatly appreciate your help.
  14. Thanks
    TellMeWhy got a reaction from kpcollier in jQuery on the Details Section of a Datapage (Calendar)   
    It should work. What worked for me is putting the CDN on the Header of the Results Page instead of the Details Page. It seems that the script is executing faster than the DataPage can include the jQuery library when you include it on the Details page, hence, the $ not defined
     
  15. Thanks
    TellMeWhy got a reaction from kpcollier in Virtual Fields - Go To Next Field After Input   
    I'm not versed in jQuery terms but I got this working with the following.
     
    First include the cdn of jquery on your Header, you get no errors, so, that means you already have it included, but for anyone who might need it 
    HEADER > DISABLED HTML EDITOR
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> FOOTER
    If you want to go through every input, then use 'input' instead of cbParam
    What the code in the if does is it goes to the parent element of the current input (it goes to div) then searches the NEXT siblings(other divs, it will not go up) with children who has <input> element, and the first one (.find()) it sees, it will focus.
    <script> $('input').keyup(function () { if (this.value.length == this.maxLength) { $(this).parent().nextAll().children('input').first().focus(); } }); </script>  
    If only Virtual Fields, cbParam is not used in class, but ids and name, you may use the following:
    <script> $('input[name*="cbParamVirtual"]').keyup(function () { if (this.value.length == this.maxLength) { $(this).parent().nextAll().children('input[name*="cbParamVirtual"]').first().focus(); } }); </script> I don't really do jQuery, so, I'm sure there's much better way than this, but, this one works, so why not.
  16. Like
    TellMeWhy got a reaction from kpcollier in Timepicker JS - Only update if not null   
    Oh, alright, sorry about that, thank you for the solution, as well!
  17. Thanks
    TellMeWhy reacted to kcastagnaro in Calendar Pop up   
    Hi! I was actually able to figure it out. I had to customize the following in my CSS. It was 14px. Thank you so much for your help!
     
    div.numInputWrapper span {
        position: absolute;
        right: 0;
        width: 2px;
        height: 50%;
        line-height: 50%;
        cursor: pointer;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }
  18. Like
    TellMeWhy got a reaction from Stepford in How can I get numbers to align to the right?   
    If you want to apply this to any data type, you may do the following in the Styles Page

  19. Thanks
    TellMeWhy got a reaction from kpcollier in Get Values From List - String Into Text Field   
    Sure!

    Btw, I found a way
    <script> document.querySelector("input[id^='InsertRecordList']").addEventListener('change', function() { document.getElementById('cbParamVirtual1').value = document.querySelector("input[id^='ComboBoxInsertRecordList']").value; }); </script> The input with id starting with InsertRecord**FieldName** stores the checked values, so you can just use that as a reference to listen for a change

     
    You can try it out again https://c2aby549.caspio.com/dp/83ff8000344c2f4c1794467fb6e2 
    Cheers!
     
  20. Haha
    TellMeWhy reacted to Flowers4Algernon in New User   
    Hi, Faldo!

    Watching tutorial videos helped me when I first started using Caspio. This might help you as well: https://howto.caspio.com/getting-started-videos/
  21. Like
    TellMeWhy got a reaction from kpcollier in Get Values From List - String Into Text Field   
    I'm confused what are you using? MultiSelect Dropdown or Listbox, afaik, Listbox doesn't display the concatenation of choices, right?

    Is this what you're trying to do?

    https://c2aby549.caspio.com/dp/83ff8000344c2f4c1794467fb6e2
  22. Like
    TellMeWhy got a reaction from aaronfreed in jquery on 'click' confirm not working   
    This is not working because Caspio does not have the jQuery library, you will have to include it in your header. You may find the CDN here https://www.w3schools.com/jquery/jquery_get_started.asp
     


     

  23. Thanks
    TellMeWhy got a reaction from kpcollier in Select Dropdown Option Based On Text Value   
    @kpcollier I see, that's quite the workflow.

    Basically, what you want is the onchange function in the virtual field that receives C, and then select that option in the dropdown. It should easily be able to select the same value with the script, like : 

    document.addEventListener('change', function (event) { 
    document.getElementById("InsertRecordTitle").value = document.getElementById("cbParamVirtual1").value;
    });
     
    I'm only changing Virtual 1.


  24. Thanks
    TellMeWhy got a reaction from kpcollier in Add a value from the Dropdown field to the Text field   
    If you're hiding it, you don't need to, you just want to pass the dropdown value if it's changed. Just do script for both, if a dropdown is hidden, they will not be changed anyway, so, the script should not fire.
    For example I have a dropdown with id cbParamVirtual1
    document.getElementById('cbParamVirtual1').addEventListener('change', function() {
    document.getElementById('InsertRecordTitle').value = document.getElementById('cbParamVirtual1').value;
    })
    for your 2nd dropdown, if it's cbParamVirtual2, just do the same, and rename the Virtual1
    document.getElementById('cbParamVirtual2').addEventListener('change', function() {
    document.getElementById('InsertRecordTitle').value = document.getElementById('cbParamVirtual2').value;
    })
  25. Like
    TellMeWhy got a reaction from kpcollier in Best Datatype for Time Field - Sorting Inside Calendar By Time   
    I believe Caspio does not have Time only DataType, you have to use DateTime, can't you just use formatting and display time instead? 

     

     
    The values in my table
     
×
×
  • Create New...