Jump to content

Vitalikssssss

Caspio Rockstar
  • Content Count

    403
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Vitalikssssss

  1. Hi @Prophecy, First, you should use Caspio`s build-in event handlers (e.g. Datapage ready). Second, you should change the way how you trying to reference calculated field. You use Submission form along with Calculated Value form element as I have understood. If my assumption is correct than you can use the following code: <div id="Section_2" style="display:none;"> Some text Section 2 </div> <div id="Section_3" style="display:none;"> Some text Section 3 </div> <div id="Section_4" style="display:none;"> Some text Section 4 </div> <-- This code goes into Datapage footer--> <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { let calcField setInterval( function() { calcField = document.querySelector("[id^='InsertRecordText']").innerHTML; //insert your field name i.o. Text Hide(calcField); }, 2000); //interval of function execution 2 sec function Hide (calcField) { if (calcField < 33) { document.getElementById('Section_2').style.display = 'block'; document.getElementById('Section_3').style.display = 'none'; document.getElementById('Section_4').style.display = 'none'; } else if (calcField < 66 && calcField >= 33 ) { document.getElementById('Section_2').style.display = 'none'; document.getElementById('Section_3').style.display = 'block'; document.getElementById('Section_4').style.display = 'none'; } else if (calcField < 100 && calcField >= 66) { document.getElementById('Section_2').style.display = 'none'; document.getElementById('Section_3').style.display = 'none'; document.getElementById('Section_4').style.display = 'block'; } } }); </script> Hope this helps. Regards, vitalikssssss
  2. Hi @DesiLogi, You have made a small error in the field names reference in JS. You should have used Tags_Areas and Tags_Projects in the JS code. The code will work just fine as soon as you apply above changes. Regards, vitalikssssss
  3. Hi @NiceDuck, It will not be possible to capture who has deleted the record with Triggered action. I would recommend using another Datapage with auto-submit JS which would insert a record to the history log table. You configure your page to re-direct after record delete to the submission form and also pass parameters on exit to the submission form. However, this workflow would work only if you delete records from Details page. Hope this helps. Regards, vitalikssssss
  4. Hi @scottd, Here is a topic with a solution: Hope this helps Regards, vitalikssssss
  5. Hi @DesiLogi, Please send me an exported copy of the Datapage along with dependencies via private message, so I could have a close look. In the interim, you may import the Datapage which I`ve created while working on JS solution. It works fine on Mac. I can select multiple items by holding Command key. Regards, vitalikssssss CaspioData_2019-Oct-01_0958.zip
  6. Hi @kpcollier, This should be possible with Triggered Action. The Trigger should run on "insert event" and should checked #inserted value with lookup table values. You can create a new record in the lookup table if there are no records returned. Regards, vitalikssssss
  7. Hi @scottd, You can utilize Calculated value for the described scenario. https://www.youtube.com/watch?v=15zAruBT3LA Hope this helps. Regards, Vitalikssssss
  8. Hi @DesiLogi, Try using the following script in the Footer of the Datapage: <script type="text/javascript"> function f_listbox(v_state) { if ( v_state.indexOf(",") > 0 ) { for (let i=0 ; i < o_state.options.length; i++ ) { if(o_state[i].value == v_state) { o_state.remove(i); break ; } } let o_st = v_state.split(", ") ; for (let j=0 ; j < o_st.length; j++) { for (let i=0 ; i < o_state.options.length; i++ ) { if(o_st[j]== o_state.options[i].value){ o_state.options[i].selected = true ; break ; } } } } } document.addEventListener('DataPageReady', function (event) { let v_state = ["CompanyName", "FirstName", "LastName"]; //Field names goes here let o_state = []; v_state.forEach(function(el) { if (el !== null) { o_state.push(document.getElementById("EditRecord"+el)); } }); o_state.forEach(function(el){ if (el !== null) { el.multiple = true; } }); f_listbox(v_state); }); </script>
  9. Hi @Carioca, BTW there is a setting in Datapage wizard available for this. Regards, vitalikssssss
  10. Hi @DesiLogi, As I have understood you would like to have something similar to this: You would need a bit of JS to achieve this. Initially I have used this post as the inspiration for the following JS code which produce list of items. <!––Place this code into HTML block.--> <div id="demo[@field:Record_ID#]"></div> <!––[@field:Record_ID#] is a unique indentifier of the record--> <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { let list_string, arr, arrLen, text, i; list_string = "[@field:Text]"; //field where you store comma delimited string arr = list_string.split(','); arrLen = arr.length; text = "<ul>"; for (i = 0; i < arrLen; i++) { text += "<li>" + arr[i] + "</li>"; } text += "</ul>"; document.getElementById("demo[@field:Record_ID#]").innerHTML = text; // use unique indentefier of the record i.o. [@field:Record_ID#] }); </script> Hope this helps. Regards, vitalikssssss
  11. Vitalikssssss

    Pass Parameter

    Hi @Andrew, I am afraid that you will not be able to parse multi-select Listbox parameter in your second Datapage, however you should be able to achieve the desired logic of filtering if you use search form with multi-select Listbox on your second Datapage. You can create a Javascript code which would click on the "Search" button within 2nd Datapage after user clicks on "Search" on the 1st Datapage and also hide a Search form from the 2nd Datapage. Here is JS code which I have used: 1. Wrap a Search from from 2nd Datapage with the following: Header: <div id="search_form"> Footer: </div> 2. This code should be placed in the Footer of the 2nd Datapage. <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { //hide a search form from 2nd DP document.querySelector("#search_form").style.display = "none"; let buttons = document.querySelectorAll(".cbSearchButton"); //adding onclick event listener to the 1st DP search form buttons[0].addEventListener("click", ()=> { //clicking on search button of 2nd DP with a delay setTimeout(()=>{buttons[1].click();}, 500) }, false); }); </script> Hope this helps. Regards, vitalikssssss
  12. Hi @Roosta, I have managed to create the following Pivot Report based on the data you have shared. Let me know if you need any additional calculations in this Pivot report. Regards, vitalikssssss a1_Pivot_test_1_0_2019-Sep-26_1403.zip
  13. Hi @DesiLogi, I am not quite understood the logic of your Tabular/Gallery datapages. Do you have bulk edit option enabled where you would like to use ListBox with multiselect option? Regards, vitalikssssss
  14. Hi @Roosta, Can you share a datasource table, so I could try to build a relevant example using Pivot? Regards, vitalikssssss
  15. Hi @TaxGuy, I believe that the JS event you currently use causes the issue. Try to use Caspio built-in event handler BeforeFormSubmit explained in this article: https://howto.caspio.com/release-notes/caspio-bridge-13-0/13-0-impacted-areas/ Hope this helps. Regards, vitalikssssss
  16. Hi @NickO, I do not think it would be possible without back-end programming. I would suggest contacting Caspio Professional Services Team who can build this type of integration via back-end. Regards, vitalikssssss
  17. Hi @CHlux, I do not think you will be able to transfer file via Zapier. Perhaps you should check WebMerge REST API which should have a method to post a file into external database such as Caspio. Caspio REST API supports file transfer. You can check Swagger documentation in order to find the method for file transfer. I would recommend Professional service department of Caspio if you are not familiar with REST API. Hope this helps. Regards, vitalikssssss
  18. Hi @DesiLogi, Perhaps you can add a simple alert("Success") function to notify the user that submission was successful. Regards, vitalikssssss
  19. Hi @DesiLogi, You can use window.open() function for your second URL and setTimeout for the first URL in order to refresh the page after the second URL opens. <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { window.open('[@field:Second_URL]'); setTimeout(function(){ window.location.href = '[@field:First_URL]'; }, 3000); }); </script> Please note that pop-ups are blocked by the default in most commonly used web-browser and a user must allow pop-ups prior it will be opened by JS. Hope this helps. Regards, vitalikssssss
  20. Hi @DesiLogi, I am 100% sure that you have also received an error in the browser Console before form submit. This error means that Value attribute can be set to an empty string only. I believe this is a security restriction of the browser. I can suggest storing a URL of the picture i.o. storing a file in the table. Hope this helps. Regards, Vitalikssssss
  21. Hi @Corpcatalog, You can build such Chart in Caspio but you would need to modify your table first. You table should look like the following: You can build the following Chart once you transform your table: You may import attached Datapage to your account in order to see the settings for the Chart Datapage. Hope this helps. Regards, vitalikssssss CaspioData_2019-Sep-10_1309.zip
  22. Hi @mgredmond, It looks like a Bug to me. I would recommend reporting this issue to Customer Support via a ticket. Hope they will be able to address it quickly. regards, vitalikssssss
  23. Hi @kpcollier, You should consider using Triggered action for this type of ID generation. Your Trigger should be based on Order table and should update the #inserted. Also, you need to have on field to store a sequence number of the Order. You can import attached examples to find more about the Trigger. Hope this helps. Regards, vitalikssssss Dynamic_ID_number_1_0_2019-Sep-05_1359.zip
  24. List-String is a special Datatype and I am afraid you cannot use is in SQL functions.
×
×
  • Create New...