Jump to content


Caspio Guru
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Hastur

  1. @aarchuletajr Here is the example of the trigger you need: The "New" block returns the sum of all new values and "Existing" block returns the sum of all existing values. Case block within the "SET" part checks if the Existing sum is present. If not, it throws "0" as the value. You can find the application with this trigger attached - TRIGGER_Update_Parent_Total_1_0_2019-Jun-12_0929.zip
  2. @deemuss It is possible using some additional JS code. Please insert this snippet of code into the footer of a datapage: <script type="text/javascript"> document.addEventListener('DataPageReady', test); function test() { if (typeof Highcharts === 'undefined') { setTimeout(test, 20); return; } var chartObj = Highcharts.charts[0]; if (!chartObj) return setTimeout(test, 20); chartObj.yAxis[0].axisTitle.element.setAttribute("transform", "translate(0) rotate(0 25.66 146.5)") } </script> Do not forget to disable HTML editor of the footer! Let me know if you need any further assistance.
  3. @Vitalikssssss It is possible to implement this workflow using additional JS. Please find the application with the same feature implemented - test.ziptest.ziptest.zip Please note that you should disable HTML editor before you insert the code. Here are the snippets of code you should insert into your datapage: Header: <style> .cbHTMLBlockContainer { padding: 0 !important; } </style> HTML Block under the field you want to hide: <table style="margin: 0; padding: 0;" id="ruleDiv"> HTML Block below the field you want to hide: </table> Footer: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { let hide = document.getElementById('ruleDiv') let checkId = 'cbParamVirtual1'; document.getElementById(checkId).addEventListener('change', function (event) { if (event.target.value == "Y") { event.target.value = "N"; hide.style.display = "none"; } else if (event.target.value == "N") { event.target.value = "Y"; hide.style.display = ""; } }); }); </script> You need to define the ID of your checkbox you want to use as a condition to define rule: let checkId = 'cbParamVirtual1';
  4. @Vindy I have checked your tables. I think that using JS in your case will be very inefficient. The code will be huge, slow and unmanageable. You should try to change the table structure to make it more normalized. Check these articles to get familiar with normalization of tables: https://howto.caspio.com/tables-and-views/relationships/ https://en.wikipedia.org/wiki/Database_normalization
  5. Hello @Vindy Can you elaborate a bit more on the condition of the hiding? Also, I can not import your tables attached. Please try to make another export with dependencies to let me upload datapages in my account.
  6. @alexdo Hello! There is no way to pass the Password field as the parameter because the value of this field is encrypted. You can use the Text field to pass Password, but this approach is SUPER INSECURE. Can you describe your workflow? Maybe we can find some workaround.
  7. Hello @wvantongeren You can implement this workflow using View, Trigger and Task. Find the application with needed functionality attached - Forum_Post_wvantongeren_1_0_2019-Apr-30_1016.zip Let me describe the logic of the application. 1. You need to create an additional table with all Companies. Within the table, you need to have a field to define the status of the company for today. It can be Yes/No field, let's say. You need to create a relationship between your Main table and Companies table. After, you need to create a trigger within the Main table on Insert action to check the usage field of a related company. 2. You need to create a view based on the companies table. The filter of the view is the Usage field needs to be unchecked. We will use this view as the lookup source for Radio buttons field within datapage. As soon as a user submits a new entry, the company will disappear because the chosen company is in usage now and it does not match the view filter. 3. The last step is to create the task which will uncheck the usage field on the daily base.
  8. @Becca37 You may use the "Preview" button to test SQL queries. The "Preview" button opens the datapage in new tab with current set up before you finish the adjustments. The article regarding this feature - https://howto.caspio.com/datapages/managing-datapages/previewing-datapages/
  9. Hello! This feature can be implemented using additional JS code. Please find the example of the application attached: CaspioData_2019-Apr-24_1224.zip The idea is to create two arrays. The first is the full information blocks of each entry. The second is the value of status. After that, based on the value of status, we need to change the color of the block. There is also one trick which can help you. You can insert the value of the status in the HTML block with your own custom class. In this case, you will get the value easier. It can be something like this: <p class="status">[@field:Status]</p> Here is the example of the code to manipulate the data.: <script type="text/javascript"> document.addEventListener('DataPageReady', function () { var blocks = document.querySelectorAll(".cbResultSetPanelDataContainer"); var statuses = document.getElementsByClassName('status'); for(var i = 0; i < blocks.length; i++) { if (statuses[i].innerText == "Pending") { blocks[i].style.cssText = "background-color: Tomato; margin-bottom: 8px; border-radius: 4px; box-shadow: 3px 3px 4px gray;"; } else if (statuses[i].innerText == "Approved") { blocks[i].style.cssText = "background-color: DarkSeaGreen; margin-bottom: 8px; border-radius: 4px; box-shadow: 3px 3px 4px gray;"; } } }); </script> You should insert this code into the footer of the calendar datapage.
  10. @Becca37 Hello! It is possible to implement such a workflow using Calculated field and additional JS code. The idea is to count entries with needed statuses within the table using Calculated Field. If there are more then 0 entries - we need to hide submission form and show the message. I created an APP for you. Please feel free to import it - JS_Dynamic_Disable_Submission_1_0_2019-Apr-09_1223.zip Let me know if you have any questions. Client credentials are: Login - Password client1 - 1 client2 - 2 client3 - 3
  11. @Glitch Yes, sure. All support channels are free - https://www.caspio.com/support/
  12. Hello @wvantongeren I have implemented the same looking Daily stand as you want. To do that, I have created an additional table for metrics (values like Planning, Kwaliteit and so on) and an additional table to add new days for new Daily stand. Also, I have created a trigger that copies values of Metrics into main Daily_Stand table to create a new blank table for a new day. I have created the datapage that use dates as the search criteria and then show the tabular report with Grid Edit option to let you update the Daily stand. Please find the application attached and let me know if you have any questions. Daily_Stand_1_0_2019-Mar-28_1003.zip
  13. @Glitch As I know, it is not active by default. It is better to contact Support to be sure if it is active. :-)
  14. Hello @Carlson It is possible to implement such a script. To do that, you need to define the field which you will use to set the criteria to slop the JS code. Please find the example of the application attached. For_Carlson_1_0_2019-Mar-26_1056.zip Steps to use application: 1. Enable the deployment of the "Test_Table_des Search and Report" Datapage 2. Open Preview of the " Test_Table_des Web Form" Datapage 3. Choose values to search for and to update. Use "1" as the search value and any value as a value for Update. There are three rows with 1 value at the moment. 5. Click submit. The submission form will redirect you to the details form. It will find all rows where Update_Value equal to 1. Then the JS code from the footer will update the values to 3 automatically. Details datapage contains Calculated value. It counts all rows where Update_Value equal to 1. As soon as the result of Calculated value equal to 0, JS code stops. You can apply this logic according to your needs.
  15. Hi @Glitch First of all, you need to check if the OLD pdf generator is active in your account. To do that, you need to reach out the Customer Support team.
  16. Hello! It is possible if you use the Old PDF generator and CSS styles to hide the needed field. It is a bit tricky because the PDF generator does not see new CSS 3 selectors, however, it is possible. Please find files with the sample application and PDF instructions attached. You can import the application in your account and play around with it. The idea is to create additional datapage which you will use to print reports. It should be just the same as the datapage for WEB. The difference is that we will use the predefined criteria to find the result set. we will pass the values for criteria as parameters within PDF generator link. The instruction on how to create the old PDF generator link is in the file attached. "PDF_Report" Datapage is for the web site to be deployed. "PDF_Print" datapage is the page that we will use to print the report and hide fields that we do not want to see. I use CSS property "color" to hide the information. I color the text the same as the background. Please let me know if you have any further questions regarding this solution. PDF Generator Instruction_2017_3.pdf PDF_Old_Pdf.zip
  17. Can someone share a solution which allows to create multiple records in “child” table conditionally? I have a table “Parent” in which there are two fields “date from” and “date to”, so I need to create 3 child records if for an example I select date from 09/28/2018 and date to 10/01/2018. Thanks,
  • Create New...