Jump to content


Caspio Guru
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by TellMeWhy

  1. Here;s an updated code Virtual 2 is my dropdown You can put the dispatch event after the if elses instead so you'll have shorter code 2nd script tag is what I added <script type="text/javascript"> document.getElementById("EditRecordyess").addEventListener('change', function(event) { if (document.getElementById("EditRecordyess").checked==true){ document.getElementById("cbParamVirtual2").value='Online'; } else if (document.getElementById("EditRecordyess").checked==false){ document.getElementById("cbParamVirtual2").value='Off'; } document.getElementById('cbParamVirtual2').dispatchEvent(new Event('change')); }); </script> <script type="text/javascript"> document.getElementById('cbParamVirtual2').addEventListener('change', function(event) { if (document.getElementById('cbParamVirtual2').value=='Online'){ document.getElementById("EditRecordyess").checked=true; } else if (document.getElementById('cbParamVirtual2').value=='Off'){ document.getElementById("EditRecordyess").checked=false; } document.getElementById("EditRecordyess").dispatchEvent(new Event('change')); }); </script> <script type="text/javascript"> document.getElementById("cbParamVirtual2").addEventListener('change', function myFunction(event) { // submit the form if an value is selected setTimeout('document.forms["caspioform"].submit()',1000); }); </script> No Update and Submit works as "Submit Form" tabular reports is MUCH harder to do custom coding on
  2. what field is that dropdown? Is it the status location or an entirely different one not used in the script? 2. No, it ALWAYS refreshed upon submission of form. It's an HTML thing.
  3. Ah I know it now. changing the values on JS will not trigger the eventlistener, you need to explicitly dispatch that event once the value changes. Use this on both the if and else document.getElementById('EditRecordStatusLocation').dispatchEvent(new Event('change')); Here's my script <script type="text/javascript"> document.getElementById("EditRecordyess").addEventListener('change', function(event) { if (document.getElementById("EditRecordyess").checked==true){ document.getElementById("cbParamVirtual1").value='Online'; document.getElementById('cbParamVirtual1').dispatchEvent(new Event('change')); } else if (document.getElementById("EditRecordyess").checked==false){ document.getElementById("cbParamVirtual1").value='Off'; document.getElementById('cbParamVirtual1').dispatchEvent(new Event('change')); } }); </script> <script type="text/javascript"> document.getElementById("cbParamVirtual1").addEventListener('change', function myFunction(event) { // submit the form if an value is selected setTimeout('document.forms["caspioform"].submit()',1000); }); </script> This submits mine upon checking or unchecking
  4. Can you try this for the auto submit script? <script type="text/javascript"> document.getElementById("EditRecordStatusLocation").addEventListener('change', function myFunction(event) { // submit the form if an value is selected setTimeout('document.forms["caspioform"].submit()',1000); }); </script>
  5. '*F' + CONVERT(Varchar,[drop_id]) + '*'
  6. That should work, maybe try using columnName in the View(it might be different name as Caspio appends table name on the column name sometime) instead of inserting it via Field Picker (DISTINCT ClientID)
  7. seems like you're missing var elems = isi.parentNode.parentNode.querySelectorAll("td"); it's set just above the for loop
  8. Are you using Inline Edit and Inline Insert? If so, this will not work, because Results page is an entirely different behavior
  9. try this one inside the for loop, it seems that !important does not work there elems[i].style.setProperty("background-color", "yellow", "important");
  10. I tried putting the Script in the WebPage instead, and this is what I got
  11. Not sure if you can do it directly on Caspio, but there are third party integrations you can try https://zapier.com/apps/caspio-cloud-database/integrations/stripe https://www.integromat.com/en/integrations/caspio/stripe
  12. Try "yellow !important" , also try the loop one, that's what goes through all the td, that one is for a single td (column)
  13. does "yellow !important" not work? It probably wont, I guess, since that's applying background color to tr instead of td, try the method I gave you on the other post where all font colors become red, try changing style.color to backgroundColor and see if it prioritizes the script's color
  14. Oh, then it's much simpler, just replace 1 to what number of column that is, add another line if you want to set font color for another one, then set the column number isi.parentNode.parentNode.querySelector("td:nth-child(1)").style.color="red";
  15. Ah, I see, it seems that changing the row's font color does not work, you woul have to change each cell individually, try adding this, just below the backgroundcolor code, still inside the if (or else if you're putting it there) var elems = isi.parentNode.parentNode.querySelectorAll("td"); for (var i=0;i < elems.length;i++){ elems[i].style.color="red"; } What this does is select all the td in that specific row, then apply red font color to each one
  16. The others are putting the embedded websites in an iframe container, this prevents the forms from passing the parameters. You can deploy it as iframe, however, it will act independently from the webpage, it will redirect on the iframe only and not the page. Weebly and WordPress does not use these iframe container, I believe Weebly CMS does, but Weebly Website Builder doesn't, I'm not sure. For the Phone Formatting, Caspio's form are extremely simple, but, I guess this is a good feature to do since there are a lot of sources that has the phone formatting for each country anyway. You can create one yourself, tho, through Virtual Fields, your users would just have to input their numbers part by part, and then you can append everything, add the special characters, etc., on the actual field (set it to Calculated Value) OR use JavaScript
  17. I think you're just missing quotation? This worked perfectly on mine even on different dates if('[@field:Date*]' < '[@cbTimestamp*]'){
  18. You can convert it to TEXT 'CC'+CONVERT(VARCHAR, (SELECT MAX(Clean_Job) FROM tbl_ggl_job WHERE Job_Letter = 'CC') + 1)) Double check the parenthesis if it's the correct amount
  19. Here's a sample Child Table MUST HAVE a unique ID, you'll see why. First Part of the Trigger This is for inserting to PARENT Table Names that DO NOT EXIST yet on the Parent Table 1.) Set a VARIABLE, Select from the Child Table, and Inner Join with the #inserted, or vice versa so we can use both fields in the WHERE. Important here is to select Expression on the fields, then append the aggregation block (COUNT/SUM, ETC) use WHERE so you'll only SUM the Name in the Child Table that is the same as the #inserted 2.) Select From WHERE NOT EXISTS, select the field you want to check, in this case I want to check the Parent Table's Name Field, and then I'll check for values that are equal to #inserted.Name If it does not exist, it will proceed with inserting the values I've set 3.) For Total Allowance, I'll check first if it's not a number (because the sum can be a NULL), if it's not, I will output 0, else, the SUM. Then, you'll add the #inserted.Allowance, that's only named Allowance because you're already Selecting From #inserted in the Insert Into Block. Check if it's not blank, if it's not, get the value, else 0. 2nd Part just below the Insert Into Block What this does is UPDATE the values that are in the Parent Table. 1.) Inner Join with #inserted.Name then parent.Name 2.) Use Case When, same concept as the one in the INSERT INTO. In this case, the WHERE checks if the Child.Name that is getting summed up is equal to the Parent.Name. We're also excluding the Child ID that's being updated from that SUM (#inserted.Child_ID not equal to Child.Child_ID) because we're ADDING the NEW VALUE instead This looks complicated, but, it's actually not.
  20. It's pretty easy, just add ELSE on the code and use auto submit <script type="text/javascript"> document.addEventListener("DataPageReady", function tester(){ if(document.getElementById("errormessage")){ window.location.href = "https://www.google.com"; } else{ setTimeout('document.forms["caspioform"].submit()',1000); } }); </script> In my code I removed the display none, but, you can include that since you wouldn't want your users to be seeing that anyway, you can also reduce the 1000 delay to a faster one, but I think that's fast enough and if you have display none, it will be alright.
  21. Yeah, you actually can, but, I found that it's better to create your own element with a unique ID so you can reference the ID instead of the class I have then added an HTML Block in the authentication fields, and NOT the footer because footer and header code gets removed when the Failure Message appears, apparently. <script type="text/javascript"> document.addEventListener("DataPageReady", function tester(){ if(document.getElementById("errormessage")){ window.location.href = "https://www.google.com"; } }); </script>
  22. It might be better to use Dropdown or Radio button for the On Hold Field so you get Yes, No, and Any option. If you want to use checkbox, you'll have to use this option There would be no way to display all records regardless if it's On Hold or Not, though.
  23. I've tested this and it should work, it thought it was the datediff formula, but it's still working on mine. I've refreshed your page and it seems to be working now, try changing the color for the ELSE part
  24. Hmm, can you screenshot your HTML Block code? Screenshot your calculated field as well
  • Create New...