Jump to content

Sam23

Caspio Ninja
  • Posts

    39
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

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

Sam23's Achievements

  1. A follow-on: what about LEFT, RIGHT and MID for a string in triggers?
  2. Is it possible to use LEN to get the length of a field in a caspio trigger? I am using this in a calculated field to determine when to execute a statement, but now would like to do that from a trigger. Thanks, Sam
  3. Sorry Volomeister - I realized my question doesn't make sense. Your code above works great.
  4. Thank you so much! Volomeister! Now my issue is that the trigger executes before the data is saved. So the concantenation uses the un-updated contact_address record. This must be a common issue. What are best practices to solve this?
  5. I have a contact_address (CA) table that collects addresses for a contact. I would like to upload those addresses to a text field in the contact table for convenience. The table trigger when a user inserts or updates a record in CA table is supposed to loop through the addresses and put those into a field in the contact table. In the loop shown, if a contact has 2 records in the CA table, the result is two copies of the same address, the inserted record. How do I get it to iterate through the CA records rather than repeating the same address twice? Thanks so much.
  6. I need to pass into a datapage whether I want a private list (pv=1) or not (pv=0) If pv=1, I need to filter by author If pv=0, show all records Is it possible to use if-then logic with a datapage filter? I am stuck Thanks, Sam
  7. MeeKee or other: Now I want to put the DOB in the same expression, following the age. I'd like the format mm-dd-yyyy. Here is what I have that doesn't work: CONVERT(varchar(20),FORMAT([@field:K2_Contact_Birthday],"mm-dd-yyyy")) this gives me an invalid formula. Help! Thanks again.
  8. Thanks so much Park and Meekee! Fixed my issue.
  9. I have a calculated field on a Datapage calculating age using DateDiff. I would then like to add text, such as 'y/o', but get a validation error, I am guessing because the DateDiff is a number and then I am continuing on with text. What is the syntax to handle this? Thanks so much!!
  10. This is exactly what I need, but not understanding completely. Say we have two tables: Parent and Child. When I insert a record into Parent, I need a record in Child table with the ParentID which is not available until after the trigger runs. On a Parent insert trigger, I insert record into Child and store that ChildID in the Parent table (Update Parent with that value)? From there, how do I get the ParentID into the Child table? I could do a Child Update and use a join with the Parent table on that ChildID stored in the Parent table, but it still can't retrieve the ParentID until after the trigger runs. Right? Thanks for helping Sam
  11. BillP: There should be no reason to do separate DataPages for each question, if I am understanding the above post. You just configure each question as needed from the panel on the left in the "Configure results" tab. I think that is just an issue of becoming familiar with Caspio. The bigger issue, and one that I am also looking for a solution, is when you need records in more than one table for a new entry of any kind. To accomplish this, I used a DataPage with autosubmit to create a record and then pass parameters to a second datapage where the user entered information. This seems very awkward but accomplishes the task. My issue is that I need the primary key value to pass to a second table. This can't be accomplished with an insert trigger because of referential integrity. The record must commit before that value is known, and that happens after the trigger executes. The insert trigger throws an error if I try to get the primary key and pass it on to a second table. I can only accomplish that with an update trigger. My only solution currently is the autosubmit DataPage which commits the record so I can then use the primary key. I am hoping someone has a solution for this.
  12. Nice Duck: Thanks so much for the response. I got this figured out and cleaned up. Part of problem is that I am so new to triggers and I was making a mess. Sam
  13. I have a many to many connector table: Contact x CT1 that connects Contacts to groups in CT1. I would like a trigger on the Contact table such that when a record is updated, it checks to see whether there is a record in the Contact x CT1 table with the inserted ContactID and CT1. The CT1 is temporarily stored in the Contact table when a record is added. I am looking for a record in the Contact x CT1 where there is a double match: both the ContactID and the CT1 from the inserted. Here is what I have so far, but I am getting duplicates in the ContactxCT1 connector table with this: Thank you!!
  14. Thanks for the info! really helps Sam
  15. Is Weebly the only web platform that can handle caspio forms other than WordPress? I am finding that Caspio is not compatible with Wix, GoDaddy, Google or any other web page server I can find. I am able to post a single page, but cannot pass parameters on anything but Weebly. Also, am I correct that there is no phone number formatting within Caspio? Such as (999) 999-9999 ? Seems odd. Is this industry standard since foreign phone numbers can have a variable number of digits? Thanks for the clarification. Sam
×
×
  • Create New...