Jump to content

MayMusic

Caspio Evangelist
  • Posts

    1,510
  • Joined

  • Last visited

  • Days Won

    79

Community Answers

  1. MayMusic's post in Auto Populating an Email address in a Table using Formula was marked as the answer   
    On your submission page where users register, select Calculated value as form element  and concatenate the values :
    [@field:First_Name]+'.'+[@field:Last_Name]+'companyname.com' It can also be a formula field in the table but will not be editable later on
  2. MayMusic's post in Phone number Formatting was marked as the answer   
    In this link, you can find how to refer to an element on different DataPage types
     
  3. MayMusic's post in Pass parameters Calculated fields was marked as the answer   
    As I understand you have a Calculated Field in your report page and you are trying to pass that value as a parameter from a report or details page.  If that is the case you should be able to select that value from picker and the format is: '[@calcfield:1]' for instance:  https://caspio.com?value=[@calcfield:1]
     
     
  4. MayMusic's post in Style - Grid Edit on results page was marked as the answer   
    You should look for .cbResultSetGridTableHeader and .cbResultSetGridHeaderCell
  5. MayMusic's post in Table Column Formula Age Calculation Invalid Formula Error was marked as the answer   
    Nondeterministic functions cannot be used on formula fields in the table but you can use them in calculated value and calculated fields on your DataPages. In the table, the formula is not valid when it contains SQL subqueries, aggregate functions (SUM, AVERAGE), nondeterministic functions (GetUTCDate, Rand), or other formula fields.
  6. MayMusic's post in Dropdown List was marked as the answer   
    You can change the DataType of the school field in the table from text to List - String and add the school options to the table. Refer to https://howto.caspio.com/tables-and-views/data-types/list/. 
    Then the user will have the option to select more than one or all
  7. MayMusic's post in Dynamically formatting a column in a tabular report was marked as the answer   
    Refer to  this forum post:
     
  8. MayMusic's post in Membership fee was marked as the answer   
    You need to create a Report DataPage based on your member Table. In your Shop table you should have Member_ID
    Then you can read the values for this member from Shop table using SELECT statement. Refer to https://www.w3schools.com/sql/sql_select.asp
    For instance:
    SELECT field name FROM table name WHERE condition
    SELECT SUM(Shop A) FROM ShopTable WHERE Member_ID = [@field:Shop_ID] Another calculated field can be added for Shop B:
    SELECT SUM(Shop B) FROM ShopTable WHERE Member_ID = [@field:Shop_ID]  
  9. MayMusic's post in SQL use EXISTS to display Yes was marked as the answer   
    In the report that you have based on your parent table you can have:
     
    CASE WHEN (SELECT COUNT (NTAID) FROM Evaluation WHERE NTAID = [@field:NTABase_NTAID] ) = 0 THEN NULL ELSE 'Yes' END  
  10. MayMusic's post in Turn Off Submission Form after Specific Date was marked as the answer   
    To hide the entire form you can use the code below:
    <script> var date= new Date('03/04/2018'); var today = new Date('[@cbTimestamp*]'); if (date < today){ document.getElementById("caspioform").style.display = 'none'; } </script>  
  11. MayMusic's post in Possible to have automatic logout upon hitting "Submit" button? was marked as the answer   
    @telepet
    Then You just need to change the destination after record update to be the logout link.
  12. MayMusic's post in How to set Date field automatically to default today's date? was marked as the answer   
    receive external parameter in this format: [@cbTimeStamp*]
  13. MayMusic's post in Blank fields bring up entire database - how to avoid? was marked as the answer   
    Try to separate your search and report in two pages like this: http://howto.caspio.com/tech-tips-and-articles/tech-parameters/how-to-separate-search-page-and-results-page-into-two-different-webpages/
     
    And then in Section 5 check Value Required for all parameters
     

  14. MayMusic's post in Disable Submit Button if checkbox value is "Yes" was marked as the answer   
    You can have this code in Footer of your update page:
     
    <script>
    if (document.getElementById('EditRecordApproved').checked){
    document.getElementById('Mod0EditRecord').style.display="none";
    }
    </script><script>
    if (document.getElementById('EditRecordApproved').checked){
    document.getElementById('Mod0EditRecord').style.display="none";
    }
    </script>
    <script> if (document.getElementById('EditRecordCHECKBOXFIELDNAME').checked){ document.getElementById('Mod0EditRecord').style.display="none"; } </script>  
    Replace CHECKBOXFIELDNAME with the actual field name
  15. MayMusic's post in Checkbox on Submit if statement was marked as the answer   
    You can have this code in the Footer of the page:
     
    <script> document.getElementById('Submit').onmouseover = function(){ if (document.getElementById("DROP DOWN FIELD ID").value == "National") { document.getElementById('CHECK BOX ID').checked = true;} else { document.getElementById('CHECK BOX ID').checked = false; } } </script> Replace "DROP DOWN FIELD ID" and "CHECK BOX ID" with appropriate IDs
  16. MayMusic's post in User Login Redirecting Issues was marked as the answer   
    Edit your HTML DataPage and uncheck "Enable HTML editor" replace the code and finish the page it should help. If not then probably I did not understand the issue elaborate more with an example ...
  17. MayMusic's post in Maps And Search Results - How To Display Different Numbers Or Results was marked as the answer   
    You need to have another report page which is pulling all the results and create your map of off that. Hide the report and only show the map. Then deploy both report pages on one web page.
  18. MayMusic's post in Change A Form Field Value On Submit was marked as the answer   
    You can have a script that calls a function on submit to check the box
    <script> document.getElementById('caspioform').onsubmit = function (){ document.getElementById('CHECKBOXID').checked="True"; } </script> Code can go to the footer of the page and "CHECKBOXID" needs to be replaced with actual element ID.
  19. MayMusic's post in Create Link On Fly Based On Dropdown Selection was marked as the answer   
    Let's say you have the name and URL in table. Include both to your page
     
    Name: dropdown
    URL: Cascading dropdown
     
    Add a HTML Block right after Name field and have the code below to show the link after selection
    <div id="details"></div> Add one HTML Block above URL field and paste the code below to hide cascading
    <table style="display:none;"><td> One HTML Block below URL and use the code below:
    </td></table> <script> document.getElementsByName('InsertRecordName')[0].onblur= function (){ var URL = document.getElementsByName('InsertRecordURL')[0].value; if (URL){ document.getElementById('details').innerHTML="<a href="+URL+">Details </a>"; } } </script> Replace "InsertRecordURL" and "InsertRecordName" with the actual field names.
  20. MayMusic's post in Show/hide Results Page was marked as the answer   
    Have a div around each report deploy code and give it an ID and hide it, for instance:
     
    Report 1:
    <div id="r1" style="display:none;"> Caspio Deploy code of report 1 </div> Report 2:
    <div id="r2" style="display:none;"> Caspio deploy code for report 2 </div>  And then on the web page have this script below all deploy codes:
    <script> var report = getParameterByName('r'); if (report == 'r1'){ document.getElementById('r1').style.display = 'inline-block'; } else if (report == 'r2'){ document.getElementById('r2').style.display = 'inline-block'; } function getParameterByName(name, url) { if (!url) url = window.location.href; name = name.replace(/[\[\]]/g, "\\$&"); var regex = new RegExp("[?&]" + name + "(=([^]*)|&|#|$)"), results = regex.exec(url); if (!results) return null; if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, " ")); } </script> Note, the destination after submission on search page you have URL to the page where you have deployed your pages in this format:
     
    http://URL?r=[@field:NAME OF THE FIELD USER SELECTS REPORT]
  21. MayMusic's post in Accessing External Data was marked as the answer   
    If you are receiving the data from another page not the table source you should be receiving it in this format: [@L1_time_in]
  22. MayMusic's post in Hide Search Page When Details Open - Using Separate Search And Results Datapages was marked as the answer   
    If not then add Header/Footer to details page
     
    Header:
     
    <div id="details">
    Footer: </div>
     
    <script>                  document.getElementById('search').style.display="none";             </script>  
  23. MayMusic's post in How To Automate Submit Form With .js While Filling Field was marked as the answer   
    There is an auto submit code which you can use in your code at http://forums.caspio.com/index.php/topic/4314-js-auto-submit-a-datapage/
     
    You need to call your function before submitting the page and then auto-submit in the function. For instance
    <SCRIPT LANGUAGE="JavaScript"> function Fill_field() { document.getElementById("InsertRecordPeriod").value = (pperiod); setTimeout('document.forms["caspioform"].submit()',1000); } /* On submitting the webform, the function Fill_field is executed */ Fill_field(); </SCRIPT>
  24. MayMusic's post in Expiration Date was marked as the answer   
    Add this code to the footer of the page. Make sure to replace "DATEFIELDNAME" with the field name you want to save this expiration date on
    <script> function f_date(){ var v_currentDate=new Date(); v_currentDate.setDate(v_currentDate.getDate() +10); var v_assignDate = (v_currentDate.getMonth() + 1) + "/" + v_currentDate.getDate() + "/" + (v_currentDate.getFullYear()); document.getElementById('InsertRecordDATEFIELDNAME').value = v_assignDate; } f_date(); </script>
  25. MayMusic's post in Prevent Right Click And Copy/paste On Datapage was marked as the answer   
    Try to see if this code works for you:
    <script type="text/JavaScript"> var message="NoRightClicking"; function noCopy(e){ return false } function reEnable(){ return true } document.onselectstart=new Function ("return false") if (window.sidebar){ document.onmousedown=noCopy document.onclick=reEnable } function defeatIE() {if (document.all) {(message);return false;}} function defeatNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3) {(message);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=defeatNS;} else{document.onmouseup=defeatNS;document.oncontextmenu=defeatIE;} document.oncontextmenu=new Function("return false") </script>
×
×
  • Create New...