Jump to content

Casey

Members
  • Content count

    10
  • Joined

  • Last visited

1 Follower

About Casey

  • Rank
    Member

Recent Profile Visitors

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

  1. I have 1 form that, upon creation of a new record, needs to create records in several tables. I'll give a simplified example: New CallLog Record creates: New Client record New Pet record New Visit record The problem is that the Pet is a child of the Client and the Visit is a child of the Pet and the Client (using autonumber primary key in the parent and integer foreign key in the child). The CallLog record is a parent to all three for lookup purposes. I created a triggered action with 3 insert blocks to create these three entries. However, it looks like the triggered action must be asynchronous because sometimes the child is able to grab the primary key from the parent and other times it is blank (indicating the parent hasn't been created yet). I don't know what the ID for the parent will be until after it is created. The obvious solution is to create the first parent record then trigger the child to be created from there (as a triggered action on, say, the Client table rather than the CallLog table). However, Caspio doesn't allow nesting of triggered actions so an error is produced. My current solution is a terrible and very fragile cascade of datapages that is autocompleted and autosubmitted and redirected to the next one as my user sits with infinite patience and tries not to hit the browser's back button. I can hardly stand it and I built it. I'm 100% sure my users will not tolerate. I've racked my brain for a way to solve this problem. Any ideas?
  2. On a submission form I would like to set the default contents of a text field using a calculated value. I can see that I am able to somehow interfere with the text field from within a different field that is set to datatype 'calculated value' however I don't know how to actually set it. As a simple example I've written this: [@cbParamVirtual1] = "hello world" into my calculated value. The result of this particular statement is that whenever I type into Virtual1 the data disappears. "Hello World' does not appear. Any suggestions are appreciated.
  3. I am using the Calculated Value datatype in my submission form. The update form for the same table needs to also have a calculated value that can change when the user input changes (like the one in the submission form has). However that datatype doesn't seem to exist in the update forms. I can't use tricks like hidden cascading autocompletes (as I use elsewhere) because the query is far more complex than a simple SELECT statement. Any thoughts on how to get around this?
  4. Ok, I solved it for myself. It isn't working within the datapage footer but when I put the script on the footer of the webpage that I've embedded into the datapage it seems to work just fine
  5. My client would like some of the larger forms on our project to alert the user if they attempt to navigate away before using the submit button. Obviously I want to use a beforeunload event listener for this but I can't get it to fire. In preview mode it fires an error because of the cross-source of the event listener, which is fine. But in the live version it simply doesn't fire at all. I'm using pretty simple syntax: window.addEventListener("beforeunload", function(event) { event.returnValue = "Write something clever here.."; }); Is this something that Caspio suppresses? Is there a workaround? My client is pretty adamant about this functionality.
  6. Field 1 is a text box. Field 2 is a cascading dropdown off of Field 1. Using jQuery .val(), I am successfully updating the contents of Field 1. The problem is that Field 2 doesn't update it's cascade choices based on the new value in Field 1. It all works when I manually change Field 1 and the jQuery code is successfully putting the value in Field 1. I'm not sure where my issue is occurring. Thanks!
  7. Maybe this is answered elsewhere but I couldn't find it. Does Caspio sanitize user input for SQL and HTML injection before we use it as variables in our DataPages? I had just assumed it did because that seems pretty basic, but I thought I'd ask if anyone knows. Thanks, Casey
  8. Casey

    Custom Dropdown Choices

    Thanks for your replies. The specific thing I was trying to do was to filter dropdowns by not only the cascading information but also whether or not a checkbox field was checked. I was able to do this by using a view instead of a table as my dropdown source. Thanks again.
  9. Casey

    Custom Dropdown Choices

    I need a dropdown menu that is basically a lookup field from another table that has a predefined relationship. However, I need to limit the choices based on other factors. Specifically, this should be done with record-level security but I'm not using built in record level security because it is too restrictive (I have a user-type that can see all records and the record-level security doesn't support this). I don't want to make my whole app twice (once for people with normal record-level security and again for people who get to see everything). So, I've managed to limit all the records that folks get access to on my own, but I'm having trouble with cascading dropdowns on my submission forms. I'm hoping to make some javascript that loops through the table in question and pulls out all the records the user is allowed to see, but I don't know how to access the other table. I am guessing I'm going to have to make an API call here, but I was wondering if there were another way to access records with joins/known relationships from within he datapage builder. Any ideas are most welcome :)
  10. Upon insert or update into a table, I want to trigger an action that only happens sometimes. If the record inserted has a field that matches certain criteria, I want to trigger inserting a record into another table. The problem? When I choose an If/Then logic block, and I add in a 'field' to compare against, the 'field' item does not contain the fields of the table I'm working with. What am I missing? My screenshot has just the beginning of this process to keep it simple. I've included a shot of the table I'm working with--it does have fields! Thanks for any help.
×