Jump to content

ClayG

Caspio Ninja
  • Posts

    37
  • Joined

  • Last visited

  • Days Won

    3

ClayG last won the day on November 3 2021

ClayG had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ClayG's Achievements

  1. Thank you @ParkLoey and @imJihyo! That's very helpful.
  2. We have lots of conference events each year with vendors who exhibit at our conference. We have them pick a booth number from a list of maybe 50 potential booth locations. I'm thinking of building a simple app for vendors to see a list of available booths and after they choose an available booth, that booth number becomes unavailable. I don't think this will be hard but I thought I'd ask if anyone has already created an app like that?
  3. I don't know if this will serve your needs but I added a button on a report results screen so that the user can click a single button and it does a rich-text copy to their clipboard of all the content on the report results page. Here's the simple HTML for the button: And here's the script that I put into the footer of that report page so that the button above can call the script.
  4. In case anyone else has a similar need, here's what I came up with that seems to work okay... In the datapage on the configure fields screen, I created a virtual field that is a calculated value. In my case, I put in a SELECT statement that retrieves the date in the record that is being (potentially) updated. My example: Next, I created another virtual field that is also a calculated value, and I use the Datediff function to see how many days there are between the current time and my other virtual field. I multiple this by "-1" to make it a positive number. I then used the "Rules" feature to see if my virtual field is greater than whatever number we decide to go with (e.g., 30 days) and if it is, my actions on the Rules screen will hide different sections of the datapage.
  5. I have built an app in Caspio for asking people to potentially volunteer on short term assignments. They get an email with the details, and there's a link in that email that goes to a simple data page which uses the "Find record through unique ID" to open the specific volunteer request we are asking them to respond to. It works well. But now we want to somehow expire these requests such that if the user doesn't respond within 14 days, we want to block them from responding (Yes or No) to the volunteer request. I can't think of how I might put this into place?
  6. I don't have a question. I just wanted to share. I have appreciated previous posts and Caspio articles on how to use Javascript to change background colors on a row or cell when a certain value is detected. Recently, I wanted to do this on a calculated field, but I also wanted to color the row by comparing two values in a record, and I wanted a different background color depending on that comparison. In my case, I have a column in the table called Target and a calculated field called Count. By way of explanation, we ask people to volunteer on teams and the "count" shows how many people that have volunteered so far and "target" is our goal of how many we hope to get on a team. So I color-code a row with green when we've met our target number of volunteers, and I color-code the row as light red when we're still short. I started with this Caspio "howto" article. Here's the code I used. On the screen for Configure Results Page Fields, I added an HTML block as the first element. It just had this single line: <div id="visi[@field:Record_ID]"> NOTE: my field called "Record_ID" is a unique field. It is import to reference a unique field like an autonumber field. I added another HTML block in my list of datapage elements. It's the last element, which allows the entire row in the report to get the background color. In the code below, I'm comparing my field called "Target_No" against the calculated field that I have labeled as "Count". </div> <script> if("[@field:Target_No]" > "[@calcfield:1#]"){ var isi = document.getElementById("visi[@field:Record_ID]"); isi.parentNode.parentNode.style.backgroundColor= "#ffe6e6"; } else if("[@field:Target_No]" == "[@calcfield:1#]"){ var isi = document.getElementById("visi[@field:Record_ID]"); isi.parentNode.parentNode.style.backgroundColor= "#e6ffe6"; } </script>
  7. Thank you so much for posting that! I will give this a try very soon.
  8. Thank you @kpcollier! I sat on one of Ned's recent live sessions and he shared his thought on this of using a trigger to send the email. That works great for a newly added (inserted) record. But I need this to work for a record being updated so I'll probably try your Calculated Field suggestion above and see how that works. Ned's sample trigger:
  9. I have a datapage that allows a user to submit either a Yes or No on whether they are willing to volunteer for something. While I can currently send them a simple acknowledgement that contains their response, I want to send a different email if they answer Yes vs. No. Is this possible?
  10. I appreciate your response!! I put that in place, It didn't work but I noticed Chrome showed this error in the inspect tool: Uncaught TypeError: Cannot read properties of null (reading 'value') So while trying to diagnose that, I ended up with just this code and it worked!! So thank you!! <script> document.addEventListener("BeforeFormSubmit", function(event) { var nameID = document.querySelector("input[id*='InsertRecordPerson_UUID']").value; if(nameID == ''){ alert('You have not specified a person.'); event.preventDefault(); } }); </script>
  11. I'm still trying to learn JS. I have a submission form with a few virtual fields. The most important virtual field is configured as an AutoComplete on a PEOPLE table to make it easy to find a person by their name. I need to grab and store that person's ID value so my submission form is configured with a Calculated Value for that ID field. Example: SELECT Person_UUID FROM People WHERE Name = '[@cbParamVirtual1]' My problem is, how to prevent someone from submitting the form unless they have successfully found & selected a person from my virtual (autocomplete) field? I have tried variations of the code below but none have been successful. When I preview my datapage and test it, I can still submit a record even though my calculated field didn't retrieve a value. <script> document.addEventListener("BeforeFormSubmit", function(event) { // var VirtualVal = document.querySelector('select[name="InsertRecordPerson_UUID"]').value; // var check_field = document.getElementsByName("InsertRecordPerson_UUID").value; var nameID = document.querySelector("input[id*='InsertRecordPerson_UUID']").value; if(VirtualVal == ''){ alert('You have not specified a person.'); event.preventDefault(); } }); </script>
  12. I started working in the Caspio platform in November 2021. Since then I have built 5 different apps and I have deployed over 80 datapages. Our record counts are not huge. Across all my apps, we have around 660K records in total. I also completed their certified developer program shortly after it was released. I'm a fan of the platform. The one and only thing that continues to frustrate me within Caspio regards application server performance. Perhaps the database server gets overly busy too, but I suspect it's most often the application/web servers that get slow. When I watch Ned do his training videos, the speed and performance of Caspio is great. Nearly instant response all the time. In contrast, I'm on Site 14 - b8.caspio.com, and the only time I can consistently enjoy speedy response from Caspio is outside of typical business hours. During business hours, performance is up and down. I have opened tickets with Caspio support *many* times about performance throughout 2022. I've since given up. I follow best practices with regard to design, and we don't have a ton of simultaneous users. Peak usage? We'll average around 10 users per day using various apps that I've written. I have only 5 modest table triggers in place, and these rarely fire -- just a few times a day, updating single values in simple tables. When our Caspio site is slow, it's slow everywhere... it's slow as I'm just trying to navigate within the Caspio admin interface... it's slow as I use any of the datapages I have developed... it's sometimes even very slow just trying to login to Caspio. I had someone contact me via LinkedIn to ask if I might help them with their Caspio apps. I had to decline but they shared that their biggest frustration was also the slow performance of their apps. Comments? Is the relatable for anyone else? My suspicion is that I'm on a busy site (site 14 - b8). The Caspio System Health site isn't very informative for this. It's limited in what it checks.
  13. For others who might come along later, I was able to use my other ID field that was an 8-digit number. I had to first get it changed to be a unique column in my PEOPLE table (and *bad* on me for not setting like that from the start!), and then as was well.
  14. Thanks, while the person_ID field is configured as unique in the PEOPLE table, I can't do so in the ORDER_DETAILS table since the same person could have multiple orders in the future. I'll add that my person_ID field is set as a text(255) field in the ORDER_DETAILS table. In the PEOPLE table, it's also set that way but marked as unique. The values are similar to GUID (e.g., aa12710e-6085-4c30-9d7f-8ba6eef397de) but an external system is in control of these lengthy GUID values so I can't let Caspio pick them nor can I set the field type to GUID in Caspio for the same reason. But I'm going to see if another 8-digit number field that I also have as an option for serving as a person_ID might work better...
  15. I have been able to set up datapages using the technique of having a virtual field that is configured with AutoComplete which is then combined with using a Calculated Value element to select the appropriate record_id value using a SELECT statement and WHERE clause, e.g., = '[@cbParamVirtual1]' That works well for new records in a submission form. I'm struggling though with how to do something similar when using a Reports --> Tabular datapage, and you need the user to be able to change the existing field but still offer an AutoComplete. To use a common example, let's say I have a simple order entry app, and thus I have a table for ORDER_DETAILS and a table for PEOPLE. The table for PEOPLE has a person_ID field (unique record identifier) and that value gets stored in the ORDER_DETAILS table as the ship-to-customer. If I create a datapage to edit ORDER_DETAILS, when the user finds the order to edit, how can I make it easy for the user to change the ship-to-customer with an AutoComplete feature? When I attempt to set up my detail page fields similar to a submission form, it doesn't work. The current "ship-to-customer" doesn't appear on the detail page screen unless I configure that field as either "Display Only" or perhaps as a Dropdown, but that's not practical since we have 1000's of people records.
×
×
  • Create New...