Jump to content

Sam23

Caspio Ninja
  • Posts

    33
  • Joined

  • Last visited

Everything posted by Sam23

  1. 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.
  2. Thanks so much Park and Meekee! Fixed my issue.
  3. 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!!
  4. 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
  5. 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.
  6. 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
  7. 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!!
  8. Thanks for the info! really helps Sam
  9. 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
  10. I need to add a new record to a table when a user clicks a checkbox on a DataPage. What is the best way to do this? A table trigger does not seem to fit this use case because it's only when a box is checked in one table that I need the record added to another table, and only if it's a new click and the record doesn't already exist in the second table. Thanks, Sam
  11. Sam23

    parameter scope

    okay, if my url is something like: https://urlstring?cid=[@K2_ContactID]&aid=[@authorID]&cbResetParam=1 then this will pass the two parameters to the next page and then extinguish them? Thanks, Sam
  12. Sam23

    parameter scope

    I am passing parameters in URLs and find I need to explicitly reset or extinguish them or I get erratic behavior of some of my forms. How do I do that? Thanks, Sam
  13. Thanks, all! The last answer by GoodBoy was what I needed. I was already using RLS to limit records to a particular group using the app, but then needed to further refine the privileges within that group to those who could view only vs edit, etc. The answer is simple: put an authorization level in the user table and use a virtual field to capture that role or level and show or hide what I need to from there. Thanks, Sam
  14. When a user logs into the app, is is possible to capture the user role if that data is in the users table? Thanks, Sam
  15. Thanks, but the issue is that I have a static value I want to pass, not a field value. I want a button that goes to a specific page and does not vary according to what record I am in. It should be a simple matter of typing in that static value in the URL, but so far I've tried no quotes, single quotes, double quotes. Nothing works.
  16. I need to pass a static literal value in my URL - a link that passes in a specific ID each time. What is the syntax for that : ?tid= if the parameter being passed is "tid"? I have tried single quotes, double quotes, brackets. So far nothing works. When I look at the URL being passed, additional symbols such as %20 have been added to the front of the literal value I am trying to pass. Thanks for the help, Sam
  17. Thanks all for the clarification. I am still getting familiar with Caspio and learning that when I stay within their expected boundaries, everything I need is there. When something isn't available, that's a clue that I am trying to do something the element wasn't designed for, ie not best practice. Thanks for your patience Sam
  18. Thanks, TellMe - Do you mean undo the table relationship and see if that helps? If the syntax above is correct, the issue must be something in the tables themselves. I may make some new tables and start over. Thanks, Sam
  19. Here is the triggered action. When I insert a record into the Contact table, I want to insert a record into the Users table taking the ContactID (primary key of the Contact table) and putting that in the User1 table as a foreign key.
  20. I am a newbie trying to write my first triggered action. I have watched several tutorials and my trigger code validates and saves, but there is no action in the tables. I am trying to insert a record into table 2 when a record is inserted into table1. Simple enough. What are suggestions for trouble shooting the trigger? I have validated that the tables relationship is there, that I am using the inserted data (not the table name). My trigger looks identical to examples in this forum and on Caspio videos. Thanks for suggestions Sam
  21. Very simple newbie question: I have a header url link sending the user to another form. I need to save the edit on the current DataPage before moving. I just need the syntax or method to save and then move and don't know where to find this info. Thanks Sam
  22. I need to use a virtual field to capture user input in a search report, but virtual field is not available. Why are virtual fields not consistently available? Anyway to resolve this?
  23. From my administrator form, I would like to pass in the correct value of a security restriction on a dropdown box. In other words, I have a user group that should see only certain values in the dropdown, but I am logged in as administrator, so I don't want the restriction to be according my credentials, but rather the user's credentials. I would like to pass in the value to match in the dropdown table. Is this possible?
  24. I have a search report and would like to have the option to either pass in a search value, or if none is submitted, let the user enter the search value. Is this possible? It seems like I would need to duplicate datapages if that functionality is not available. I would like to see the same datapage, sometimes coming from another datapage and passing in a value, other times not coming from elsewhere and the user enters the search value. Do I need two datapages to accomplish this? Thanks, Sam
  25. In the datapage search report where I pass in the value of the search parameter, is there any way to pass in two values - ie I'd like to see records with parameter value a or b? How is this usually handled? Thanks so much, Sam
×
×
  • Create New...