Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

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

sfraden's Achievements

  1. Tried this: Did not work. Apparently when you auto-submit a page it does not trigger the event to run, only if you manually hit the submit button.....
  2. OK, slight update, I think I have narrowed down the actual issue here, might be a bug. When making a Virtual Field, I can access its value by using document.getElementById("cbParamVirtual12").value I have done this many times in other places and it works perfectly. UNLESS I make that virtual field a Calculated Value, then every attempt to access it in the same way fails as it returns NULL no matter what calulation I have going into it.... The failure renders the entire JS Script void and thats why it appears to refuse to run, due to Caspio being unable to access and return the value of a virtual calculated field Am I doing something wrong?
  3. This did not work either, which when I look at it seems to be exactly the same as I already had. This is a report datapage. What I am trying to do is check for the existance of a record in a totally different table. I am using a sql query to get a specific value from that record and put it in Virtual11. If the record exists, I get a value, if not the value is blank. The user has clicked on a button that triggers this check to be done. The idea is IF the Virtual11 field is blank, then load a specific page, tho if the field has something in it then ELSE show an alert message. I have the button setup correctly and it triggers the function just fine, problem seems to be that when I put any sort of IF statement inside the function, it simply does not execute the IF/ELSE at all. But If my function simply contains anything else BUT AN if statement, it executes perfectly fine.
  4. I can verify the function IS being called, but the IF statement is not executing at all. Note if I remove the IF and go straight to the URL, it works, is there some reason why the IF is non-functional?
  5. I actually tried to do your suggestion, and while I can obtain the BOOL value accurately, the problem is there is a delay when processing the calculated field after page load. The javascript to check the virtual field fires off BEFORE the calculated Value is populated, so it always comes back FALSE......
  6. I wish I could do that, however the console is useless as when the error occurs, the submission page is set to auto submit, so it refreshes like 20 times a second...
  7. Tried this method too, did not work either.... <script type="text/javascript"> document.addEventListener('FormSubmitted';, function(event) { var content = document.body.textContent || document.body.innerText; var hasText = content.indexOf("Values in one or more fields are invalid.")!==-1; if (hasText) { window.location.href = "https://c1acyXXX.caspio.com/dp/48c0900099f0e199ea0043XXX09";} }); </script>
  8. Tried this, unfortunately did not work, the datapage still loops infinately....
  9. I have a specific form that creates a new entry in a table, and I need it to NOT create an entry if one already exists, instead just go to a diferent page altogether. I can prevent the duplicate entry by making a field unique, the form submit will fail and no new entry will be made. Problem I have is that the initial page that makes the table entry auto-submits when you open it (which is by design). If it successfully completes the table entry, it then auto-loads the next datapage, however if it fails the submit it actually reloads the entire page which in turn tries to re-submit the document and gets caught in a loop of submitting failures forever. What can I do to detect the failure and then re-direct to a different data page? I tried the below code to attempt to trap it, but it does not work... <script> var v_elements = document.getElementsByTagName("p"); for (var i = 0; i < v_elements.length; i++) { if (v_elements.className == "cbFormError") { location. href = "https://c1acyXXX.caspio.com/dp/48c0900099f0e199ea0043c3XXXX"; } } </script>
  10. Im trying to find a solution, the table is not made yet. It's moot now, found out you cannot use the contents of a field as a fieldname....
  11. I see where your going with this, and if the database was not already crammed with data from 500 different locations, it might work. Also not sure how to make a triggered action to do just that, as I already have the below as a TA right now (Thats just one section pictured, multiply it 126 more times, and its about to double in size too) Any TA that runs to do what you think it can, can only run under certain conditions: Only if the user is inside a particular datapage, and can only execute once per day. I have a LOT of different datapages that can trigger an update response in this table, and anything that creates a new entry cannot be duplicated.
  12. Not exactly, the content of field w1d1 are the names of other fields, seperated by commas. Pulling it out is not the issue, its using the pulled out names as a fieldname to act on that is the issue. clarify: Field w1d1 contains "g1" i need to use that entry to access field g1. Field g1 actually contains the information i need.
  13. OK, so I need to make a task that will read in a text field in a record, process the text into individual parts (This much I can already do) and then use each part as a field name to get the actual data I need. Example of a record: Field 'W1d1' contains text of "g1,g18,g47,g73" I would separate the text into 4 vars, v1="g1", v2="g18", etc. I then want to use the contents of v1 as a fieldname to get the contents of field 'g1' Is this sort of conversion possible in a TASK? I wish we could use arrays as fieldnames..... SFraden
  14. Thanks, that solves the one issue, of auto submitting, but not the other. When the user goes to make a new submission, they open a datapage to do it. I need that new submission page to be pre-populated with yesterdays data. Triggered events only occur AFTER the user hits 'SUBMIT', and tasks only occur on a timed basis, so neither of these can populate the fields of a submission form after loading the form.....
  15. Unfortunately neither of those will work, they are both after the fact options....
  • Create New...