Jump to content


Caspio Rockstar
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by TellMeWhy

  1. you're lacking innerhtml field1.innerHTML == "ASSISTANT SCHEDULED" if innerHTML does not work try innerText
  2. Shopping Cart notification means the number of emails/items right? This is actually quite a complex feature to apply even for a technical person as it involves API, and if you want it to be real time, as in in the instant a communication is created, it will update, it will use A LOT of API calls. A workaround is using a Calculated Value use SELECT statement based on your criteria and count the number of communications created https://howto.caspio.com/function-reference/#:~:text=Returns a results set of records from one or more tables. then design it how you like, no 'alerts' though
  3. Put an ID to the img tag, and remove the parameter value at the end <img id="imgelem" alt="Virtual17" src="https://chart.googleapis.com/chart?chs=150x150&amp;cht=qr&amp;chl="/> Update the code you have already, just put a name in the function Add this code to the code you have already document.getElementById('imgelem').src +=document.querySelector("input[name='cbParamVirtual1']").value; this.removeEventListener("change", changer); see above for the whole code what this does is append the value of Virtual1 to the src of the image. the removeEventListener is to make sure this runs only ONCE because for some reason, the code runs twice in Chrome
  4. Probably the rendering of charts, you can increase delay here, 500 means 500millisecond delay
  5. What's an Editable table? Do you mean Grid Edit?
  6. Try JS instead, <script type = "text/javascript" > var timer = setInterval(function() { //Find if chart exists using rect element every x milliseconds if (document.getElementsByTagName('rect') != null) { //Update Chart UpdateChart(); } }, 500); function UpdateChart() { try { Highcharts.charts[0].update({ //CHANGES HERE series: [ {color:'red'}, {color:'blue'}, {color:'yellow'} ] //CHANGES END HERE }); //Stop checking clearInterval(timer); } catch (err) { //log errors } }; </script> basically makes the first one red, then blue, then yellow No script: With the script
  7. Can you try removing this and see if it vaildates?
  8. Probably because your THEN is a string, and your ELSE is a 'number' Try to convert it to text CONVERT(VARCHAR, (Datediff(day,[@field:Eval_Fax_in_Date],GetDate())))
  9. That's not possible, unfortunately. https://stackoverflow.com/a/39854499 You have to manually upload it once saved if you're using PC, cause in mobile devices, once captured, it's uploaded in the input field
  10. What do you mean by ComboBox? Is this List-String DataType? If so, you can't use that in Triggered Actions nor Application Task. Here's an example, using Application Task. (Application Tasks are used when you already have data in your table, and you want to update another Table using the data there. Triggered Action is when you insert/change the records in the table, and then do some actions on another table based on what happened.) Table 1: Table 2: Item_ID is important here so we know where to put the Expiration Date Application Task: You update the Table 2, and Inner Join the Table 1 using the Item_ID on both Tables Once ran, it should update accordingly
  11. What is this table for? If you just want to see the Item added AFTER submit, you can refresh the page after submit. Create a Reports DataPage based on the Table, and then use iframe deployment inside an HTML Block in the Submission Form. Take note that iframes are not mobile friendly. You can set static sizes https://howto.caspio.com/faq/deployment/how-to-resize-an-iframe/ I'm pretty sure you can also use script to make the width dynamic
  12. 1.) Create Calculated Field: STUFF((SELECT TOP 1 ', ' + (COLUMNAME1)+', '+ (COLUMNNAME2) FROM TABLENAME ORDER BY COLUMNNAMEOFDATE DESC FOR XML PATH ('')), 1, 1, '') This will get one record that has the latest DATE according to DATE column. If you want to append more columns, just add like +','+(COLUMNNAME3). If the column is not Text(255) DataType, use Convert (+','+ CONVERT(VARCHAR, COLUMNNAME3)) 2.) Create this div in Header, same ID, Disable Advanced HTML Editor 3.) FOOTER SCRIPT: <script> var x = document.querySelector("table[id^='cbTable_']").rows[1].cells[1].innerHTML; var container = document.getElementById("customer-info"); container.innerHTML=x; </script> This just gets 2nd row, and 2nd column of the table (HEADER included), my Calculated Field is the 2nd field in my DataPage Settings that's why I use cells[1], you may change depending on the position of the Calculated Field, counting starts from 0 Hide Column in Tabular Report to Hide Calculated Field:
  13. ah, well, then we have to change the code a little, try this, this should now work depending on the formatting set. document.getElementById('test3').innerHTML = document.querySelector("span[id^='cbParamVirtual1@Data']").innerHTML; Just change the Virtual1 part with the proper one, Virtual2, 3, etc.
  14. What styling specifically? IF you mean the $ then you can simply put add it like document.getElementById('test3').innerHTML = "$" + document.querySelector("input[name='cbParamVirtual1']").value; Caspio Formatting is not done through value level, but, only on the 'front' level, so if you take the value, it won't get the currency, percentage, etc of the formatting
  15. It's a simple Calculated Value with static value
  16. Here's a sample HTML Page, embed code for details page is at the top. Here's the code that I used window.addEventListener('load', function() { document.querySelector("input[name='cbParamVirtual1']").addEventListener('change', function() { document.getElementById('test3').innerHTML = document.querySelector("input[name='cbParamVirtual1']").value; }); }, false); first line is to wait everything to load in the page. 2nd line is change because Calculated Values/ Fields 'loads' when the DataPage is loaded, so it changes during that time, 3rd line is the script, I added id="test3" on the span for 225.21 so I can put the value there. You don't need to repeat this multiple times, just get the Calculated Value that may take the longest to load and use that for the addEventListener, then set the innerHTML of multiple elements inside just like what I did.
  17. it should be the same if you put the script in the webpage instead of DataPage, it's JavaScript, as long as the element exists in the page, it will be able to get it
  18. This is quite tricky, basically, you have lookup table for assistants, and they can only be booked PER DAY, and if they're booked for that date already, then they're not selectable in the dropdown. Here's what I tested Virtual Field 1 STUFF( (SELECT ' , ' + CAST (FIELDNAME AS nvarchar) FROM TABLENAME WHERE DATEFIELD = target.[@field:DateFIELD] FOR XML PATH ('')) , 1, 2, '') What this does is combine all records that meet the criteria. We want to use this to select values where the date is the specific date that the user is booking. For example here, I'm using June 28 2021 as the date and the three values showed up. Virtual 2 is a Custom and LookUp Table Dropdown Script <script> document.querySelector("input[name='cbParamVirtual1']").addEventListener("change", function(event){ var d2 = document.getElementById("cbParamVirtual2"); var a= document.querySelector("input[name='cbParamVirtual1']").value; for (var i=0; i<d2.length; i++) { if (a.includes(d2.options[i].value)){ d2.options[i].remove(); } else { d2.options[i].style.display = "block"; } } }); </script> What this script does is loop through the options in dropdown and check if 'a' (or the Virtual 1 Calculated Value) includes the said option then removes it from the dropdown. I hope this helps!
  19. They do allow embedding, but, the container they use is iframe, which prevents some function of Caspio's DataPages to work, this can be avoided by using iframe deployment instead of embed deployment, but, again, iframe(deployment) is not really recommended for most workflows, especially if it's gonna be viewed via mobile
  20. GoDaddy uses iframe for embedding outside content, which is kinda hard to integrate, same as Wix, Weebly has some builders that use iframe as well, but the standard one does not, so, it should be fine
  21. Yeah, you should be able to using JavaScript, here's an example of how to get the Calculated Value's value using JS
  22. Most of these are not needed. 1.) You don't need NEW NOTES field, you only need one, so you won't need the 2nd part anymore 2.) INSERT INTO tbl_job_notes SELECT FROM Job Table instead of #inserted This is an example In this, if I update Table one Quantity, what will get inserted in tableTwo is the OLD quantity since the new quantity is in the #inserted.Quantity You can add Where clause on the Select From if you want to check if the specific field has been updated (you're right with the tableone not equal #inserted)
  23. Just to add why +1, it's because Caspio only support US and Canada numbers for now https://howto.caspio.com/tables-and-views/triggered-actions/#:~:text=Currently only US and Canada phone numbers
  24. I'm not sure where you need this for since you've already mentioned it's the same as the Display Only one, however, this can be done through JavaScript First, create an HTML block, Disable HTML Editor, and add this <ul id="listing"> </ul> This is where the values will be listed Next on the Footer <script> //CHANGE THE FIELD var listString= "[@field:ListNUm]"; var mainList = document.getElementById("listing"); var arrayList = listString.split(','); for(var i=0;i<arrayList.length;i++){ var elem = document.createElement("li"); elem.value=arrayList[i]; elem.innerHTML=arrayList[i]; mainList.appendChild(elem); } </script> Change the field in the var listString using the FIELD PICKER, make sure you're using String, if it's a List-number DataType, still use String. This is how it looks, ListNUm is the Display Only Field, Just the Field is an HTML Block where I inserted the ListNUm field, Listed is an HTML block using this method. NOTE: What this does is separate the value between commas, so, if you have commas in your List-String choices, this will not work for you.
  25. All good for me, maybe it's your Site? try to reconfigure it or create a new one if it's already in use.
  • Create New...