Jump to content


Caspio Rockstar
  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Vitalikssssss

  1. @GWBjr Try this expression: 'www.' + Substring([@field:Email], ((Charindex('@', [@field:Email]))+1), Len([@field:Email])) Regards, vitalikssssss
  2. Hi @alicecp, I am afraid that HTML block does not support interactive sorting. Regards, vitalikssssss
  3. Hi @DonateGoodStuff, I believe you have used legacy format embed code for deploying your Datapages. Caspio has introduced Asynchronous loading of their Datapage a year or so ago and they also changed the format of embed code. Async loading gives a better performance for Datapage loading. Some Javascript events such as document.write(), onload() is not supported with Async loading. I assume that you have some Javascript (perhaps from TechTips section in HowTo) in either Header, Footer, HTML blocks which has described Javascript event handlers. I can suggest contacting Caspio Support who can help you to resolve this type of issues. Regards, vitalikssssss
  4. Hi @Mikey, I believe that it won`t be possible to track logging if the user close the browser. This type of behavior requires server side programming which is not available in Caspio. Perhaps you will be satisfied with standard feature called User Logs. Regards, vitalikssssss
  5. Hi @the1gofer, Try use "Integer" datatype for personID in table B. Hope this helps. Regards, vitalikssssss
  6. Hi @GWBjr, You may need to utilize Formula field in table where you store user information (auth. table) in order to sub struct domain name and add global domain. You can use the following expression in the Formula field: 'www.' + Substring([@field:Email], (Charindex('@', [@field:Email])), Len([@field:Email])) Finally, you can use this field in Record-Level-Security in order to accomplish your workflow. Regards, vitalikssssss
  7. Hi @Theof, Your data should reside on Caspio in order to create a Front-end part (Datapages). You can easily import your data (.csv, .xml, and others) into the Caspio account and create a relational database. Regards, vitalikssssss
  8. Hi @ManonG, You can use the following script in Datapage Footer: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { document.querySelector('[id*=InsertRecord*YOUR_DROPDOWN_FIELD*]').addEventListener('change', function() { let item = document.querySelector("select[id='InsertRecord*YOUR_DROPDOWN_FIELD*']").value; document.querySelector("input[id='InsertRecord*YOUR_TEXT_FIELD*']").value = item; }); }); </script> Please note that this JS code designed for Submission Form Datapage. Also, make sure you disable HTML editor and change *YOUR_DROPDOWN_FIELD* & *YOUR_TEXT_FIELD* to your actual field names. Hope this helps. Regards, vitalikssssss
  9. Hi @Carioca, You may consider integration with Twilio if you would like to send SMS to phone number outside of US/Canada.
  10. Hi @Ras2019, The way you trying to refer to Virtual fields is incorrect. I would recommend using query selectors with contains type of match. This code should work fine: <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function(event) { var Input1 = document.querySelector("span[id^='cbParamVirtual1']").innerHTML; var Input2 = document.querySelector("span[id^='cbParamVirtual2']").innerHTML; if (Input1 === 'WARNING' || Input2 === 'WARNING') { event.preventDefault(); alert('Enter acceptable volume!'); } else { document.forms["caspioform"].submit(); } }); </script> Regards, vitalikssssss
  11. Hi @Ed727, I am afraid that long text without HTML tags will be rendered as a single line string. Regards, vitalikssssss
  12. Hi @rgiljohann, My previous solution is a bit outdated because Caspio introduced their built-in event handlers. Please try the following updated script: 1. Datapage Header: <style> #doublescroll { overflow: auto; overflow-y: hidden; } #doublescroll p { margin: 0; padding: 1em; white-space: nowrap; } </style> <div id="doublescroll"> 2. Datapage Footer: </div> <script type="text/javascript"> function DoubleScroll(element) { var scrollbar = document.createElement('div'); scrollbar.appendChild(document.createElement('div')); scrollbar.style.overflow = 'auto'; scrollbar.style.overflowY = 'hidden'; scrollbar.firstChild.style.width = element.scrollWidth+'px'; scrollbar.firstChild.style.paddingTop = '1px'; scrollbar.firstChild.appendChild(document.createTextNode('\xA0')); scrollbar.onscroll = function() { element.scrollLeft = scrollbar.scrollLeft; }; element.onscroll = function() { scrollbar.scrollLeft = element.scrollLeft; }; element.parentNode.insertBefore(scrollbar, element); } document.addEventListener('DataPageReady', DoubleScroll(document.getElementById('doublescroll'))); </script> This should help. Regards, vitalikssssss
  13. Hi @kpcollier, Well, the easiest way which came through my mind is to apply record expiration concept described in HowTo article. You can customize "No records found" message in Localization. Hope this helps. Regards, vitalikssssss
  14. Hi @CarbonArchitect, Do you have any other custom code in this Datapage? Did you try checking code on direct URL? Do you see any errors in browser console (F12)? You may find attached copy of my Datapage which works fine. Regards, Vitalikssssss CaspioData_2019-Oct-23_1044.zip
  15. Hi @CarbonArchitect, It is possible to place top menu bar with a help of JS code snippet from below: <script type="text/javascript"> function movePA(event) { var pa = document.querySelector("table[id^='PageActionsCtnr']"); var nb = document.querySelector("table[id^='NavigationTableBottom']"); nb.parentNode.insertBefore(pa, nb.nextSibling); } document.addEventListener('DataPageReady', movePA); </script> Place above code into Datapage footer (ResultSet section). Make sure you you disable HTML editor. Hope this helps. Regards, vitalikssssss
  16. Hi @Amilcar, Can you send a screenshot with CURL and Request URL? e.g.: Regards. vitalikssssss
  17. Hi @dmarlowe, I believe you should create mediatory table as explained in Many-To-Many tutorial video. Finally, you should use this mediatory table as a Datasource for Tabular report with "Inline insert" option enabled. This method will allow you to submit more than one record with different ID`s from businesses and categories. You should consider "List String" datatype if you would like to have check-box type of selection, however you will not be able to create relationship as described above. Hope this helps. Regards, vitalikssssss
  18. Hi @Ras2019, You should wrap your SQL query with brackets and also use "0/1" for checkbox field comparison. So, your formula should look like this: CASE WHEN [@field:Agree]=0 AND [@field:Term]="Disc1" THEN (SELECT Price FROM Products WHERE Model=target.[@field:Model] AND Color=target.[@field:Color]) WHEN [@field:Agree]=1 AND [@field:Term]="Disc1" THEN (SELECT PriceReb FROM Products WHERE Model=target.[@field:Model] AND Color=target.[@field:Color]) END Hope this helps. Regards, vitalikssssss
  19. Hi @Ras2019, The syntax looks correct and should output some result if you have all fields populated with values. Can you specify the Datatype of fields used in calculated value expression? Thanks, Vitalikssssss
  20. Hi @haxx0r, Calculated fields do not support HTML tags. Perhaps, you can add HTML block and concatenate Calculated fields in there. You can use a custom JS to hide Calculated fields if necessary. Regards, vitalikssssss
  21. Hi @rgiljohann, There is an easier way how you can pass a parameter from URL to an Iframe. You can simple paste the parameter into Iframe src e.g. <iframe src="URL?HHAIPName=[@HHAIPName]" width="100%" height="1000" type="text/html" frameborder="0" style="border: 0"> This should help you to remove your JS code and <noscript> tags. Regards, Vitalikssssss
  22. Hi @Fleshzombie, You should use Caspio built-in event BeforeFormSubmit as an equivalent for JS onsubmit event if your Datapage has AJAX enabled. <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function (event) { // do something }); </script> Here is the reference from HowTo: 13-0-impacted-areas Regards, vitalikssssss
  23. Hi @kpcollier, Indeed there was a case which I did not think through. Here is a code which should resolve the issue: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { let v_fields = ["Labor1_Rate", "Labor1_Hours", "Labor2_Rate", "Labor2_Hours", "Labor3_Rate","Labor3_Hours", "Labor4_Rate", "Labor4_Hours", "Labor5_Rate", "Labor5_Hours", "Labor6_Rate", "Labor6_Hours", "Labor7_Rate", "Labor7_Hours", "Labor8_Rate", "Labor8_Hours", "Labor9_Rate", "Labor9_Hours", "Labor10_Rate", "Labor10_Hours", "Labor11_Rate", "Labor11_Hours", "Labor12_Rate", "Labor12_Hours", "Labor13_Rate", "Labor13_Hours", "Labor14_Rate", "Labor14_Hours", "Labor15_Rate", "Labor15_Hours", ]; let t_field = ["Labor1_Total", "Labor2_Total", "Labor3_Total", "Labor4_Total", "Labor5_Total", "Labor6_Total", "Labor7_Total", "Labor8_Total", "Labor9_Total", "Labor10_Total", "Labor11_Total", "Labor12_Total", "Labor13_Total", "Labor14_Total", "Labor15_Total",]; let sub_total = document.getElementById("InsertRecordLabor_SubTotal"); sub_total.value = 0; let v_state = []; let t_state = []; v_fields.forEach(function(el) { if (el !== null) { v_state.push(document.getElementById("InsertRecord"+el)); } }); v_state.forEach(function(el){ if (el !== null) { el.addEventListener("keyup", calculate); } }); t_field.forEach(function(el) { if (el !== null) { t_state.push(document.getElementById("InsertRecord"+el)); } }); function calc_total(){ sub_total.value = 0; t_state.forEach(element => { if (element !== null) { sub_total.value = +sub_total.value + +element.value; } }); } function calculate() { let i = 0; t_state.forEach(element => { if (element !== null) { element.value = ((!isNaN(v_state[i].value)) ? v_state[i].value : 0) * ((!isNaN(v_state[i+1].value)) ? v_state[i+1].value : 0); i+=2; } }); } setInterval(calc_total, 2000); }); </script> Regards, vitalikssssss
  24. Hi @rgiljohann, I think you can utilize a workaround from the following topic. Hope this helps. Regards, vitalikssssss
  • Create New...