Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 08/24/2021 in all areas

  1. What does yours look like? Mine adjusts accordinly...
    2 points
  2. try this, basically, it's excluding the elements with the said classes using 'not' <SCRIPT LANGUAGE="JavaScript"> var elems = document.querySelectorAll("td:not([class^='cbResultSetGroup1Label']):not([class^='cbResultSetTotalsData'])"); for (var i=0, m=elems.length; i<m; i++) { if (elems[i].innerHTML=="1") { elems[i].style.color="BACK";} if (elems[i].innerHTML=="1") { elems[i].style.backgroundColor="LIGHTGREEN";} } </SCRIPT>
    2 points
  3. autonumber

    Trigger and Task?

    Hi @Gigigigi, Task are operations that you can create in your application and run them manually or automatically based on a predefined schedule while Triggered Actions allow data manipulation, calculations, and sending notifications by constructing application logic with a visual interface. They will be executed on specified events to perform actions on data in your tables. You can also use Triggered Actions to transfer data from another table but if you have existing records it is recommended to use Task.
    2 points
  4. Additionally, you may refer to this article about SQL Convert: https://www.sqlshack.com/sql-convert-function/
    2 points
  5. Yes. Convert first your formula into VARCHAR. For example: CONVERT(VARCHAR(255), [@field:Field1] + ' ' + [@field:Field2])
    2 points
  6. EmmePGN

    View table not getting updated

    SOLVED! Thank you all for assistance. I finally figured out my issues and what I now have, works. The first thing I did was to calm my brains AND look at things from a 10K view. I finally quit trying to combine two events in one trigger. I was forcing the Insert and Update events together in one trigger, which is not a best practice. This can kill brain cells really quick. So, I separated these two events into 2 triggers. They now work perfectly well. Yeayyyy me! My first objective was to "INSERT" the new records to multiple tables after said new records are entered into the parent table (yes, they are relationally linked). That first image has multiple tables getting their records from the parent table. This block arrangements for the Insert trigger works really well. My second objective was to "UPDATE" the records from the multiple tables after they are updated from the parent table. The block arrangements for update also works really well for me. I thought I'd share my experience and I hope this helps others. Lesson learned = "NEVER OVERTHINK" BE SIMPLE. Simple helped me. I must add that the EEID, which is the trigger point is an auto number. I defined a scenario that as long as EEID is greater than 0, things will be copacetic. Naturally though, EEID will be greater than zero when a new record is created. Hope I make sense.
    1 point
  7. autonumber

    dollar sign

    Hello! Just to add, you can check this forum post as well.
    1 point
  8. Tubby

    dollar sign

    Hi there, You can try using this JavaScript snippet to add a dollar sign to your cascading text field. <script> document.addEventListener('DataPageReady', function (event) { var src = document.querySelector('[id*=InsertRecordMoney]'); src.onchange = function() { if(src.value.charAt(0) == '$'){ src.value= this.value; } else{ src.value = '$' + this.value; } } }); </script> The if else statement just checks whether the dollar sign is already existing so it would not duplicate it if you happen to change the value of the currency field. This is what it will look like on DataPage startup:
    1 point
  9. RuisiHansamu

    Page Break By Group

    Hi @eunha - You may want to also check this article that may help you out. https://howto.caspio.com/datapages/pdf-download/adding-page-breaks-to-details-page/ Also, you can adjust the page breaks based on your desired number. For example, you may want to add 20 page breaks. Then, you can edit it here. (Please refer to the screenshot). I hope this helps you out. Cheers!
    1 point
  10. NailDyanC

    How to speed things up

    Hi just to add in the previous comments above, here are some documentations that was sent to me by some support members of Caspio about best practices and guidelines to make your application better: https://howto.caspio.com/tech-tips-and-articles/common-customizations/tech-tip-optimize-your-web-forms-for-maximum-usability/ https://howto.caspio.com/tables-and-views/table-and-database-design/ https://howto.caspio.com/datapages/best-practices-in-creating-caspio-applications/
    1 point
  11. Joemac

    How to speed things up

    I've noticed my Caspio app has had performance hiccups lately and I'm not sure if its my setup. Sometimes it runs quick and other times is runs slow and/or needs to be refreshed to work. Are there any guidelines on how to get the best performance out of my application? I have 100+ datapages and over 6GB on storage so far - not sure if that affects speed.
    1 point
  12. GoodBoy

    Page Break By Group

    I believe this is possible by using some JavaScript. You may try the codes below. Header: <script src=https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js> </script> Footer: <script> $( "<div style='clear:both!important;'/></div><div style='page-break-after:always'></div><div style='clear:both!important;'/> </div>").insertBefore( ".cbResultSetGroup1Row:not(:first)" ); </script>
    1 point
  13. Tubby

    How to speed things up

    It isn't much of a help but you can check this link to see if there is any downtime or increase in latency on your account's site. http://status.caspio.com/ You can click on the site name and it will show some information about the current performance of the server. Edit: You can check your account site in Account > Account Settings There is also a tweet about an upcoming maintenance. Let's just hope this maintenance helps with the slight performance issues lately.
    1 point
  14. This hiding of the columns can also be achieved by using only JavaScript in the Footer: <script> document.addEventListener('DataPageReady', function (event) { let label = document.querySelector('table[data-cb-name="cbTable"] th:nth-of-type(8)'); // Select the label of eighth column let values = document.querySelectorAll('table[data-cb-name="cbTable"] td:nth-of-type(8)'); // Select all the values in the eighth column /* Removing the selected fields */ label.parentElement.removeChild(label) values.forEach(el => { el.parentElement.removeChild(el) }); /* If we want to remove additional columns */ label = document.querySelector('table[data-cb-name="cbTable"] th:nth-of-type(5)'); // Select the label of fifth column values = document.querySelectorAll('table[data-cb-name="cbTable"] td:nth-of-type(5)'); // Select all the values in the fifth column label.parentElement.removeChild(label) values.forEach(el => { el.parentElement.removeChild(el) }); }); </script> Main difference between this and approach with CSS is that here columns are entirely removed from the page, and not just hidden - in the CSS approach you could still find the elements if you inspect the page, and access the information in them, but in this JavaScript approach, they are completely removed from the page. Notice however, that in the above example we are first removing the column that comes after and work our way to the beginning. If we would also like to remove tenth column, we would put that code before the code for removal of the eighth.
    1 point
  15. If we want to show some column in the Tabular Report just for the user who is also Administrator, but for the regular Users we want to hide it, below is the example (note that this is one Report DataPage - Tabular Report): Admin view can see the Agent Name column: User view can see the table without Agent Name column: In order to achieve this functionality, we need to add the following code to the DataPage Result page footer section: <script> document.addEventListener('DataPageReady', function (event) { /* If user is not Admin, we will remove the column */ if('[@authfield:Admin^]'==='No'){ /* We need to select Parent node of the Table Label and remove the desired child element (nth-child(2)) */ let agentLabelParent = document.querySelector('tr[data-cb-name="header"]'); let agentLabel = document.querySelector('tr[data-cb-name="header"] th:nth-child(2)'); agentLabelParent.removeChild(agentLabel); /* There can be multiple rows in the Tabular Report, so we need to select them all */ let agentNameParents = document.querySelectorAll('tr[data-cb-name="data"]'); /* Using the loop to pass through each row, and remove the entry (nth-child(2)) we don't need */ agentNameParents.forEach(parent => { let agentName = parent.querySelector('tr[data-cb-name="data"] td:nth-child(2)'); parent.removeChild(agentName); }); } }); </script>
    1 point
  16. What you can do, if you want to use only one DataPage and show different navbars for users, is to have the "Users" table with the Yes/No field called Admin to check if user is Administrator, and to use Authentication based on the table. Then, make a Navbar in App Parameter like this: <p class="admin-navbar"> <a href="YOUR-URL">OPTION 1</a> <a href="YOUR-URL">OPTION 2</a> <a href="YOUR-URL">OPTION 3</a> <a href="YOUR-URL">OPTION 4 JUST FOR ADMIN</a> <a href="YOUR-URL">OPTION 5 JUST FOR ADMIN</a> </p> <p class="user-navbar"> <a href="YOUR-URL">OPTION 1</a> <a href="YOUR-URL">OPTION 2</a> <a href="YOUR-URL">OPTION 3</a> </p> We are making two Navbars, and we will filter out based on current user's field "Admin" which of these to show. So make a Footer in App Parameters with the following code: <script> document.addEventListener('DataPageReady', function (event) { /* We are selecting both navbars */ let navAdmin = document.querySelector('.admin-navbar'); let navUser = document.querySelector('.user-navbar'); /* We need to remove one only if both are present, this is to prevent console errors if reloading the page */ if(navAdmin && navUser){ let navParent = navAdmin.parentElement; '[@authfield:Admin^]'=== 'Yes' ? navParent.removeChild(navUser) : navParent.removeChild(navAdmin) } }); </script> Now just insert Navbar from App Parameters in DataPage Header section, and Footer from App Parameters into DataPage Footer section, and you'll see either admin-navbar or user-navbar based on the user authentication. Here is the result:
    1 point
  17. Tubby

    Remove Record Counter

    Hi. You can also just go to "Results Page Options" in you DataPage Wizard and go to the Advanced Tab then check this option:
    1 point
  18. kpcollier

    Remove Record Counter

    I thought there use to be a setting in the DataPage Wizard to toggle that on and off, but I can't find it either. Putting this in the header should make it disappear. <style> .cbRecordCountMessage{ display: none; } </style>
    1 point
  19. I think task would do the work for this. If I got it correctly, the only conditions are to check if the user is under any of the three lead groups and if they have submitted their answers for the survey. You can do something like this for the task: This is assuming that it is only a one-time thing. If this is going to be recurring then you might need to tweak this to have another field to base on( like a date field or something else).
    1 point
  20. Hello! I just want to update this workaround since I have found a way that will show the last submitted record without using any JavaScript. First, delete the existing script I have mentioned in the previous reply. Then, go to the Advanced tab of the Results Page Options window and set the Total Records returned into 1. Then, go to the next window and check this checkbox so that it will automatically skip the results page, and show the details page immediately for the last submitted record. Lastly, save the DataPage. Hope this helps!
    1 point
  21. Hi, The simplest way I can think of is to create a new table that is chart-able in a sense that it contains numerical results (like the count of each option chosen by your participants) and use Task to insert values to the new table. Here is an sample task that I made based on your screenshot: The new table in this sample is "Chartstbl". This is, however, assuming that you only need the current values for your presentation. If there will be new records to your Survey table in the future, then you may need to create a Triggered Action instead. This is also assuming that there are only 3 choices as seen in your screenshot (a,b, and c). You will need to create another Insert block for each of the questions. Its kind of a hassle to do that but there is a duplicate function when you right-click on the insert block. That might help a bit. This is how the new table looks like after running the task. With this table, you can use QuestionNo as the Category field and the three other columns as the Value fields.
    1 point
  22. Hi! I agree with TellMeWhy this can be achieved using Triggered Actions. I just wanted to add these links that you can refer to in creating Triggered Actions. https://howto.caspio.com/tables-and-views/triggered-actions/
    1 point
  23. So, only NEW company will trigger the Triggered Action to insert on the Process Table, right? If so, yes, that can be done with Triggered Action, maybe you just have to set a condition where if it doesn't exist yet, or even count the records with the same company name, if it's more than 0, it will not insert.
    1 point
  24. GoodBoy

    Trigger and Task?

    Hi @Gigigigi, you may want to check these informative videos as well about triggered actions and tasks. - https://www.caspio.com/webinars/introduction-to-triggered-actions/ -
    1 point
  25. autonumber

    Trigger and Task?

    Just to add, you can check these links: https://howto.caspio.com/tables-and-views/triggered-actions/ https://howto.caspio.com/tasks/
    1 point
  26. Hi all, I wanted to share a solution I came up with, which might be helpful for you. Problem: I have recently been trying to streamline page loading times, and one of the ways I've done this is to move record update datapages to Bootstrap 5 modals. It was working great for me with single record update datapages embedded in modals, but when it came to a report datapage, with a bulk edit feature, I was stumped. See the attached image. Basically, when I clicked the edit button, the pop-up for bulk edit would show up, but it would be BEHIND the modal (see my attached screenshot). Since I have my modal set to static background, that basically meant I wasn't able to edit anything in the pop-up window until I closed the modal. Not helpful! Solution: Use jQuery to assign a .click() handler to any bulk edit buttons in my datapage that is embedded in the modal. The .click() handler will wait half a second (to give the bulk edit pop-up time to be written to the page), then it will move the bulk edit pop-up div to inside the modal body. This solution is only for situations where you're including jQuery and Bootstrap 5. Here's my html modal, which lives at the bottom of my html page where the first datapage is embedded: <div class="modal fade" id="cb-modal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="imgModalLabel" aria-hidden="true"> <div id="cb-modal-dialog" class="modal-dialog modal-larger-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="cb-modal-title">Modal title</h5> <button type="button" class="btn-close bg-transparent" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div id="cb-modal-body" class="cb-form-fluid cb-form-resp"></div> </div> </div> </div> </div> The datapage that is embedded in that html page happens to be a report style datapage. Every record includes a link which will dynamically embed a second datapage in my modal, and open it. Complete with params. Here is the code for one of my links: <a href="#" role="button" data-bs-toggle="modal" data-bs-target="#cb-modal" onclick="openModal( 'Edit/Add Items', '1dae6000bcb0b9a06b9841e2a9c0', '?cbResetParam=1&garments_CustomerInvoiceNo=[@field:PSST_CustomerInvoiceNo]&garments_TrackingNo=[@field:PSST_TrackingNo]&garments_Order_id=[@field:PSST_workOrder_id]&garments_CustCode=[@field:Garments_Items_CustCode]&garments_ShipVia=[@field:Garments_Items_ShipVia_endcodedForURL]&garments_ShipDate=[@field:PSST_ShipDate]&garments_Distributor=[@field:Garments_Items_Distributor_encodedForURL]&garments_Whse=[@field:PSST_Whse]&garments_CustomerName=[@field:Garments_Items_CustomerName_encodedForURL]&garments_CustomerPO=[@field:Garments_Items_CustomerPO_encodedForURL]&garments_CustomerAccount=[@field:Garments_Items_CustomerAccount]' );">Edit/Add Items</a> Here is my function for openModal(), saved in an external javascript file, which is included with my html page: // function - deploy DP in modal function openModal(modalTitle, appKey, params) { $('#cb-modal-body').html(''); deployDP('cb-modal-body', appKey, params); $('#cb-modal-title').html(modalTitle); // draggable modal $(".modal-header").on("mousedown", function(mousedownEvt) { var $draggable = $(this); var x = mousedownEvt.pageX - $draggable.offset().left, y = mousedownEvt.pageY - $draggable.offset().top; $("body").on("mousemove.draggable", function(mousemoveEvt) { $draggable.closest(".modal-content").offset({ "left": mousemoveEvt.pageX - x, "top": mousemoveEvt.pageY - y }); }); $("body").one("mouseup", function() { $("body").off("mousemove.draggable"); }); $draggable.closest(".modal").one("bs.modal.hide", function() { $("body").off("mousemove.draggable"); }); }); } function deployDP(containerID, appKey, params) { var params = params || ''; var dataPageScript = document.createElement("script"); var container = document.getElementById(containerID); dataPageScript.src = cbDataPagePrefix + appKey + '/emb' + params; container.innerHTML = ''; container.appendChild(dataPageScript); } Finally, in the Footer in the Configure Results Page Fields section of my second datapage - the one that is embedded dynamically within the modal - I have this code: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { $('#cb-modal .cbResultSetBulkEditActionLink').click(function () { setTimeout(function () { // gives the bulk edit update form time to load if (document.getElementById('BulkUpdateForm') && document.getElementById('cb-modal')) { $('#cb-modal div.modal-body').append($('#BulkUpdateForm')); // moves the bulk edit update form inside the modal body, thereby making it editable while the modal is open. } }, 500); }); $('#cb-modal .cbResultSetBulkDeleteActionLink').click(function () { setTimeout(function () { // gives the delete confirmation time to load if (document.getElementById('Alert') && document.getElementById('cb-modal')) { $('#cb-modal div.modal-body').append($('#Alert')); // moves the delete confirmation alert inside the modal body. } }, 500); }); }); </script> I know this is a really specific example, but it seemed to me like something that could come up for other people, so I figured I'd share! Hope this is helpful.
    1 point
  27. Wow that was quick! Thanks guys. I think I'll try @GoodBoy's solution first as I do not think I will be hitting that 255 character limit soon and I am kinda in a rush to finish this. I will try @Tubby's solution later on after my presentation.
    1 point
  28. Hi there~ The reason why it doesn't allow you to use the formula field as the "Field for value" of the Cascading Elements is because of it's character limit. Since you are concatenating two Text(255) fields in the formula field, the system assumes that you will exceed the character limit of Cascading Elements which is 255 characters. GoodBoy's solution might work for you if you are sure that the two Text(255) fields combined will not exceed 255 characters any time soon. Otherwise, it will cut the exceeding characters in your formula field. A workaround that I have for this that will not remove any characters from the formula field is to create criteria under the formula field and change their form elements to the cascading element of your choice but have them use the two fields that you are concatenating as their "Field for value" so they wont exceed 255 characters. For the first criteria, use the original parent field that you are planning to use. For the second criteria, use the first criteria as the parent field to avoid any filter only records that contain the text on the first criteria. Lastly, change the comparison type to "Contains" to avoid "No records found." message when you are not search for the exact values. Here's a sample screenshot: Hope this helps! ~Tubbs
    1 point
  29. Hello @BeffreyJezos, I believe the solution in this post might work for you as well.
    1 point
  30. Heather

    Inline Insert is grayed out

    Thanks, @Tubby! So, in my case, it is because the email field is not included in my results page.
    1 point
  31. Try putting this after the addeventlistener line event.stopImmediatePropagation(); If it does not work, try putting it inside every 'if'
    1 point
  32. Do you have other fields on your Details page configuration besides those? An update button only shows up when you have editable fields. Perhaps you have some hidden fields there too?
    1 point
  33. Hi @imJihyo I experienced this before as well! Apparently, they do have a limitation for downloadable records in result pages. As a workaround, I enabled the compress feature and I haven't had any problems with it. As far as I can remember, the most number of records I was able to download was around 90k. Haven't tried going over that number though. I hope this helps! - LOEY
    1 point
  34. BINGO! Thank you so very much. Domo Arigato. Danke sehr. Merci beaucoup. Gracias.
    1 point
  35. If you have multiple datapages on one webpage, the alert might go off for all of them when loaded. If this is the case, you'll need to modify the script a bit. document.addEventListener('DataPageReady', function (event) { if (event.detail.appKey == 'MY_DATAPAGE_APPKEY') { setTimeout(function(){ alert("Please save your work."); }, 1800000); } }); You can find the DataPage's Appkey for 'MY_DATAPAGE_APPKEY' in the 'Properties' section of the datapage in the Caspio Bridge.
    1 point
  36. This may not be the best way, but it should work. Put this in the footer of your datapage. The '1800000' is 30 minutes in milliseconds. <script> document.addEventListener("DataPageReady", function(){ setTimeout(function(){ alert("Please save your work."); }, 1800000); }); </script>
    1 point
  37. Hi @kpcollier, What type of Join are you using in the View? I can suggest adding a field with a default value "0" to Orders_Table and field with a default value "1" to Completed_Table. You should use newly added fields in Join settings of the View and also select ALL records from both tables. Hope this helps. Regards, vitaliksssss
    1 point
  38. Tubby

    Datahub calls

    Yes. Failed Datahub import/exports are still counted as Datahub calls. This is because there is still an attempt from Caspio to connect to your server/s. There are no documentations about this but here is an article about Scheduled Tasks (DataHub) Tips and Best Practices that might help with understanding the different Error and Warning Messages: https://howto.caspio.com/tables-and-views/scheduled-import-and-export/scheduled-tasks-datahub/ ~Tubbs
    0 points
×
×
  • Create New...