Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

552 profile views

pilotexpressions's Achievements

  1. Thanks Xiang! I was able to get the script to work, but only under certain conditions. First, the script only worked when I used a table as the data source for my datapage. A view data source did not allow the script to function properly. I made sure to use the exact name of the field in my view, but did not work. I then tried to change the data source to the parent table and changed the name of the field from that table and it worked. Any Idea as to why a view would not work? Second, even though I was able to get it work using the parent table, it would only work in a preview, but would not work when deployed on my web page. Any suggestions? Best regards, Logan
  2. Hi Xiang, I changed the field to the name I'm using and tried the script and it still does not appear to be capitalizing any of the letters. Does it matter if the entries are both letters and numbers? Thanks for your help! Logan
  3. Do these calculations require the paid version of Caspio? I've been looking all over for this in my tabular report and cannot find it anywhere! Also, if so and need to upgrade, can I pass the calculated value into one of my datatables?
  4. I use NFC tags for my application as well. I do not know how you're using NFC tags, but I have embedded my tags with a URL that has a query string that inputs the information in the necessary fields. Follow this article and and let me know if you need any further help. Also, you must enable external parameters and checkbox "On Load: External Parameters [@your_parameter]" in order for this to work. I spent about a week trying to figure out why my query string wasn't working and all it took was a simple checkbox. Lol!
  5. Does anyone have a script that will capitalize all letters in a submission form field? Including a confirmation field? I want the entry to be recorded in my data table in all uppercase. Thanks! Logan
  6. Hi Chad, I've tried sorting my tables based on date, however, it still returns as non-valid if there is a date that is +365 days even though there may be a date that is -365 days. Logan
  7. <script> var today =new Date(); var signup = new Date( "[@authfield:Serial_Numbers_Last_Payment]" ); var renew = new Date( "[@authfield:Sheet1_Last_Payment]" ); var valid = new Date(); valid.setDate(today.getDate()-365); if (valid<signup) { /*Valid*/ document.location = "http://valid-sample.com"; } else if (valid<renew) { /*Valid*/ document.location = "http://valid-sample.com"; } else { /*Not Valid*/ window.location = "http://invalid-sample.com" } </script> Hi all, I'm using this script to validate a customers annual subscription status by date. It works well, except a customer may have multiple dates (in my app, when a customer buys a standalone subscription or buys a new product w/subscription this makes a timestamp in my datatable), but my script is only interrogating the first date it finds and either validates it or invalidates it. Lets say a customer bought a product 3/10/2015 and then buys another product on 3/11/2016, I want the script to look at the two dates and validate the latest date (3/11/16). Currently the script only seems like it is looking at the first date (3/10/15) and invalidating the subscription because it is over 365 days old. How may I change the script to allow it to keep searching for a valid date, if there is one? Thanks for the help! Logan
  8. <script type="text/javascript"> document.getElementsByName("InsertRecordOrigin_City")[0].onchange = document.getElementsByName("InsertRecordOrigin_City")[0].style.textTransform="capitalize"; function capitalize() { var value = document.getElementsByName('InsertRecordOrigin_City')[0].value; var newVal = ''; val = value.split(' '); for(var c=0; c < val.length; c++) { newVal += val[c].substring(0,1).toUpperCase() + val[c].substring(1,val[c].length) + ' '; } document.getElementsByName('InsertRecordOrigin_City')[0].value = newVal; } document.getElementById('caspioform').onsubmit=capitalize; </script> How do I change this script if I want all the letters to be capitalized? Furthermore, this field has a confirmation field that I would like to be capitalized, as well. If it also makes a difference, my field will use both letters and numbers.
  9. Maybe I'm looking at this all wrong. I think instead trying to get the record number from a reports page, I should record it when a customer submits a new form. In other words, I want to keep record of the number of times a customer submits a certain form I have created. I just found this page and it is looks to be similar to what I want it to do. http://howto.caspio.com/tech-tips-and-articles/advanced-customizations/how-to-limit-the-number-of-submissions/. More specifically, I want it to record the submission. I tried only using the "ATTENDEES TABLE (RECORDS THE SUBMISSION)" element to this tutorial, but am still having problems. I am using this script from the page, replacing "attendees" with my own field name, "Serial_Numbers": Header: <div style="display:none"> Footer: </div> <script> document.getElementById('EditRecordSerial_Numbers').value = parseInt(document.getElementById('EditRecordSerial_Numbers').value) + 1; document.getElementById('caspioform').submit(); </script> I still can't get it to work, though. Any suggestions using this? Thanks, Logan
  10. When you use a list page it shows the record count at the bottom of a page, I want to pass that number of a parameter and record it in a data table.
  11. Hi all, I am using a list report datapage to display an individual customer's purchase history. How may I record the "record count" number from this list report datapage into one of my data tables so I may keep track of the number of purchases a customer has made and use this number in other datapages? Thanks! Logan
  12. Hi skaunty, Yes, I did find a solution. First I had to create two tables, one for "customer info" and one for "serial numbers". In the tables I had to create a unique field that would tie the two together (such as User_ID). I then created a relationship between the two tables using the User_ID field and creating a "one-to-many" relationship. I also created a view table so I could easily see and use both tables in a datapage. Lastly I created an authentication page that uses the User_ID and password. After this I created my datapage. I used a list view report using my "serial number" table, and required the authentication from above. One the next page, select "Filter data based on your pre-defined criteria", "Allow parameters in search criteria" and "Bridge and external parameters". Under "Restrict record access based on user identity", I used my User_ID field. Next page, move the User_ID field over to "selected fields". Next I made the comparison type Equal and value: [@User_ID]. Under advanced, select to "receive value or parameter", External Parameter: [@User_ID], and select "If empty, ignore criteria". From here it's basically your own preferences, but I found I had to do the first few steps exactly like this in order for it to work correctly. It's a lot of trial and error, but everything is working great now. I also used this video to help me set up my pages. Hope this helps! Logan
  13. Just figured it out! I was building the query string correctly, however, I did not go to the advanced tab and enable external parameter. Doh! Something so simple, but I managed to overlook it. Thanks for all the help!
  14. The reason I wanted to build it this way is because I want to issue an NFC device that when touched will take them to the data page deployed on my website and have one of the text fields populate automatically with their ID so they did not have to type it in manually. I was going to embed the NFC chip with a URL that had a query string with their User ID. Problem is when I build the string as directed in the tutorial and replace [@field:User_ID] with their actual ID number, it doesn't populate the field. I don't know what I'm doing wrong but I still can't get it to work. Is their a better way to accomplish what I want it to do? I understand using authentication, but I am trying to not use authentication in this particular application.
  • Create New...