Jump to content

Andrii

Caspio Ninja
  • Posts

    34
  • Joined

  • Last visited

Everything posted by Andrii

  1. Hello! You can implement this workflow using some additional JS. The idea is to pass a value of a Multi select list box from Submission form to the Virtual field within the Search form. Then you need to split this string into an array and copy each value of the array to the separate search criteria. The last step is to hide all these search fields and click the button automatically. Please find the application attached. Feel free to ask questions if you have any. JS_Passing_Multiple_Parameters_ListBox_1_0_2019-Mar-12_1541.zip
  2. Hello! You can implement such a workflow using Triggers and Tasks. The idea is that you can insert multiple rows within the details table and use this table as the source to make a report with multiple lines. The next step is to set up the Task that will delete all information from the Details table so you will not keep all details within this table. You can set up Task to run each day-week-month depends on your needs. Please find the application attached. I have created the app with a similar workflow. Let me know if you have any further questions. Muliple_Lines_Report_1_0_2019-Mar-04_0937.zip
  3. Hello! Please find the application attached. Take a look at datapage named "Testing JS Report_TEST_1" I have made the example with 2 columns. This code can be adjusted depends on the amount of columns you have in the table Let me know if you have any questions. CaspioData_2019-Feb-28_0954.zip
  4. Please elaborate on your workflow if I do not understand you in a right way.
  5. Hello! It is possible to implement such a workflow using a tabular report and "custom" submission form. Please find the sample APP attached. First of all, our app needs to be authenticated. We will use the Users_ID value in the calculation. We use three tables: Items, Users and Basket_tbl. We need to create a Tabular report with inline insert and inline delete options. Users will add/delete new option to their basket using this report. In the very end of the tabular report, I have added the Iframe with the Calculated Value from the submission form. I just have hidden the submission button using CSS. It will display the total price of the basket. To test the APP open the "Basket_tbl Search and Report" page with Deploy URL Also enable the Deploy option of "Basket_tbl Web Form" Credentials are: 1. login: 1 pass: 1 2. login: 2 pass: 2 3. login: 3 pass: 3 TECH_TIPS_Basket_Of_Items_1_0_2019-Feb-25_1315.zip
  6. Hello @kpcollier ! Please, can you provide me with you tables with dummy data or with the screen shots of the tables? It will help me to build the trigger that you need. You can send me this information in private messages.
  7. Hello! It is possible to implement such a workflow using tasks. The only thing you need is to add the timestamp field to your table. This field will be filled as soon as you add a new "Shipping Confirmation" entry. Also, you can set up the task to run daily. In this case, the task will check if the Confirmation Date is blank and if the difference between the timestamp and today's date is 4 days. Here is the example of the Task:
  8. Hello! I have tried to use your map and it works perfectly. Can you provide me with the steps to replicate the issue?
  9. Hello! You can make it using additional JS code. First of all, you need to hide the buttons of submission forms. To make if you need to insert this code in the footer of the very end datapage that you deploy in your web page: <script type="text/javascript"> document.addEventListener('DataPageReady', function () { document.querySelectorAll('td[class^="cbSubmitButtonContainer"').forEach(function(i) { i.style.display = "none"; }); }); </script> After that, you need to add some code to your own datapage. You need to add the button that you will use to click two buttons of the submission forms. Here is the code: <button id="submitAll">Submit</button> <script> document.getElementById('submitAll').addEventListener('click', function() { var arr = Array.from(document.querySelectorAll('td[class^="cbSubmitButton"]>input')) arr.forEach(function(elem){ console.log(elem); elem.click(); }); }); </script>
  10. Hello Alison! You need to use the additional auto-submit Submission form to track users. Steps to implement such a workflow: 1. Create an additional Submission form with the JS auto submit code. 2. Add the link to the needed datapage after the successful submission. 3. Use this Submission form in prior to the datapage you want to track. Please find the application which tracks the user as soon as he logs into the application. You need to log in the Submission for first. JS_User_Login_Track_1_0_2018-Dec-17_1313.zip You can use the same logic in your application.
  11. @MayMusic If you want to hide just Edit button and leave the details button, use this code: <script type="text/javascript"> document.addEventListener('DataPageReady', function () { var values = document.getElementsByClassName("your_class_name"); var editButtons = document.getElementsByClassName("cbResultSetActionsLinks"); var firstButton = 2; var secondButton = 3; for (i = 0; i < values.length; i++) { if(values[i].innerHTML == your_condition) { editButtons[firstButton].style.display = "none"; editButtons[secondButton].style.display = "none"; } firstButton += 4; secondButton += 4; } }); </script> It is also adjustable if you have delete button: <script type="text/javascript"> document.addEventListener('DataPageReady', function () { var values = document.getElementsByClassName("your_class_name"); var editButtons = document.getElementsByClassName("cbResultSetActionsLinks"); var firstButton = 2; var secondButton = 3; for (i = 0; i < values.length; i++) { if(values[i].innerHTML == your_condition) { editButtons[firstButton].style.display = "none"; editButtons[secondButton].style.display = "none"; } firstButton += 6; secondButton += 6; } }); </script>
  12. Hello Alison, I will add the application to let you play with it. You can implement this functionality using JavaScript. First of all, you need to copy a value of a needed field in the HTML block adjust it as the <p> HTML element with class and hide it. To copy the value use the parameters feature. Then you need to insert the following code in the footer: <script type="text/javascript"> document.addEventListener('DataPageReady', function () { var vals = document.getElementsByClassName("your_class_name"); var buttons = document.getElementsByClassName("cbResultSetActionCell"); for (var i=0; i < vals.length; i++){ if (vals[i].innerHTML == your_value){ buttons[i].style.display = "none"; } } }); </script> You need to copy the class value of your <p> element in the "your_class_name" part and adjust the value of "your_value" part according to your conditions. CaspioData_2018-Dec-05_1425 (1).zip
  13. You can try to build this trigger not using IF-ELSE blocks but using WHERE block. In this case, you can specify your condition in WHERE block like you do in IF part. Also, it is very helpful to use JOINs to get the proper result sets and make aggregations with them. You can check this article to get familiar wi this function: https://www.w3schools.com/sql/sql_join.asp https://www.w3schools.com/sql/sql_join_inner.asp https://www.w3schools.com/sql/sql_join_left.asp https://www.w3schools.com/sql/sql_join_right.asp https://www.w3schools.com/sql/sql_join_full.asp
  14. Try to use Expressions to sum your fields. Fiend the print screens attached.
  15. Hello! You need to use COUNT() instead of SUM() to count the number of fields you insert into the table. Find the print screen attached.
  16. Hello. Follow these steps to implement such a workflow: 1. You need to add 2 Calculated values in your Submission form to retrieve the possible amount of users for the Event and actual amount of users at the time. Here is the example of the code: -- possible amount SELECT Amount_of_people FROM Events WHERE Id = [@field:Event_ID] -- actual amount SELECT COUNT(User_Name) FROM Register_table WHERE Event_ID = TARGET.[@field:Event_ID] You can make these Calculated fields as hidden if you wrap them into two HTML blocks and insert code: <table style="display: none;"> </table> 2. Add Header/Footer and insert this snippet of code: <script type="text/javascript"> document.addEventListener('DataPageReady', function () { var availableAmount; var currentAmount; var timer = setInterval(function(){ availableAmount = document.querySelector("span[id^='cbParamVirtual1']").innerHTML; currentAmount = document.querySelector("span[id^='cbParamVirtual2']").innerHTML; if (availableAmount == currentAmount) { document.querySelector("input[value='Submit']").style.display = "none"; document.getElementById("status").innerHTML = "There is no available places"; clearInterval(timer); } else if (availableAmount > currentAmount) { clearInterval(timer); } }, 1000); }); </script> This code will check if the number of attendees are equal or not and will hide the Submit button if needed. You also need to adjust the SQL and JS code according to your element names. Please find the application attached to play around with it. Also, take a look at the Tables and Relationship between them. NOTE! This APP will work only when the value of Event is already sent as the parameter on load. JS_Display_Of_Submission_Based_on_Attendees_Amount.zip
  17. Hello. You can create either an HTML block or Header/Footer and write the HTML tags with your parameters. Example: <p id="a1" style="display: none;">[@your_parameter_1]</p> <p id="a2" style="display: none;">[@your_parameter_2]</p> . . . <p id="an" style="display: none;">[@your_parameter_n]</p> After that, you can use JavaScript to call the values of your parameters and use them on your page. You can call the Element like this: document.getElementById("id_value").innerHTML() This code will give you the content in the <p> tag.
  18. Hello! Can you provide me with more details regarding your workflow? You can write me in Privat. I need some more information about your first trigger and how do you insert a few rows into the Details table.
  19. Hello. You can implement such a workflow using JavaScript. First of all, you need to add one HTML block to define the statuses. Here is the example of the HTML block: 1. Open Status. You can also insert the link of your registration form in the "href" property. 2. Closed Status. 3. Field to copy the date of the expiration. Use the parameter picker to insert the date value. Use the "Short date" format. Then you need to add header/footer and insert this snippet of code in the footer: <script type="text/javascript"> var elemOpen = document.getElementsByClassName('Open'); var elemClose = document.getElementsByClassName('Close'); var elemDate = document.getElementsByClassName('Date'); document.addEventListener('DataPageReady', function () { for(var i = 0; i < elemDate.length; i++) { var dateArr = elemDate[i].innerHTML.split("/"); var date = new Date(dateArr[2] + "-" + dateArr[1] + "-" + dateArr[0]).getTime(); var milSecDay = 86400000; var currentDate = Date.now(); var differDay = (date - currentDate) / milSecDay; if(differDay > 4) { elemOpen[i].style.display = ""; } if(differDay < 4) { elemClose[i].style.display = ""; } } }); </script> If you want, you can import my application and play around with the datapage to get familiar with this idea. Find the application attached. JS_Change_Status_based_on_Date.zip
  20. Hello! You can use additional CSS code to adjust the width of your fields. To inspect the HTML code of the page and find the Class name of a needed field you can use the Developer Tools of a browser. Find the print screens attached:
  21. Hello! You can create one additional table with the unique ID names of sites (Facebook, Twitter, Instagram) and with the actual links. Then you may adjust the relationship between this table and your report table. Create the relationship between actual link field and field that contains the links in your report table. Adjust the relationship to be displayed on datapages. Here is the article regarding the Relationship between the tables: https://howto.caspio.com/tables-and-views/relationships/ Find the print screens to implement such a workflow:
  22. Hello! Since Caspio implemented the AJAX functionality you can implement such a workflow if you have your submission form and report page deployed in the same web page.
  23. Try to use such a statement as the example: CASE WHEN [@field:date_test] < CONVERT(datetime, '09/09/9999', 101) AND IsNull([@field:Num_test], 0) = 0 THEN Datediff(year ,[@field:date_test], CONVERT(datetime, '09/09/9999', 101)) END You can adjust it for your need and add as much Case conditions as you need. You may find the standard statements you can use in formula fields. If you highlight these statement, you will find the description of the statement. Also, check these articles to get familiar with the CASE and CONVERT statements: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/case-transact-sql?view=sql-server-2017 https://docs.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql?view=sql-server-2017
  24. @edujobs2k18 To implement your workflow you can use this code: <script type="text/javascript">function addTimestamp (fileInputId, timestampInputId, textInptId) { var fileInput = document.getElementById(fileInputId); fileInput.addEventListener('change', function () { if (fileInput.files.length !== 0 ){ document.getElementById(timestampInputId).value = '[@cbTimestamp*]'; document.getElementById(textInptId).value = 'New'; } }); }; addTimestamp('fileInputId1', 'timestampInputId1', 'textInptId1'); addTimestamp('fileInputId2', 'timestampInputId2', 'textInptId2'); addTimestamp('fileInputId3', 'timestampInputId3', 'textInptId3'); . . . addTimestamp('fileInputId_x', 'timestampInputId_x', 'textInptId_x'); </script> Just find the IDs of the text fields using Developer Tools of the browser and insert these values instead of 'textInputId1', 'textInputId2'.....'textInputId_x'.
  25. To implement such a workflow you need to add Header/Footer and insert this little snippet of code into the footer. Note that "HTML Editor" needs to be disabled. <script> document.getElementById('cbParamVirtual1').addEventListener("change", function() { if (document.getElementById('cbParamVirtual1').value == 'Choice_1') { document.getElementById('cbParamVirtual20').checked = true; } else if (document.getElementById('cbParamVirtual1').value == 'Choice_2' || document.getElementById('cbParamVirtual1').value == 'Choice_3') { document.getElementById('cbParamVirtual21').checked= true; } else { document.getElementById('cbParamVirtual20').checked = false; document.getElementById('cbParamVirtual21').checked = false; } }); </script> You need to choose your own ID values of elements using Developer tools of a browser. Also, you need to adjust the values of Dropdown in the code according to your adjustments in the Dropdown. This code can be adjusted depending on the amount of the choices if the Dropdown and CheckBox. <script> document.getElementById('cbParamVirtual1').addEventListener("change", function() { if (document.getElementById('cbParamVirtual1').value == 'Choice_1') { document.getElementById('cbParamVirtual20').checked = true; } else if (document.getElementById('cbParamVirtual1').value == 'Choice_2' || document.getElementById('cbParamVirtual1').value == 'Choice_3') { document.getElementById('cbParamVirtual21').checked= true; } else if (document.getElementById('cbParamVirtual3').value == 'Choice_3' || ... || document.getElementById('cbParamVirtualX').value == 'Choice_X') { document.getElementById('cbParamVirtualX').checked= true; } else { document.getElementById('cbParamVirtual20').checked = false; document.getElementById('cbParamVirtual21').checked = false; . . . document.getElementById('cbParamVirtual2X').checked = false; } }); </script>
×
×
  • Create New...