Jump to content

Search the Community

Showing results for tags 'triggers'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Caspio Bridge
    • Caspio Apps for Ukraine
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL






Found 6 results

  1. Hi, I have a trigger in a table that runs On Update to copy and insert new records into the same table. This happens when a user selects multiple records in a tabular datapage and uses Bulk Edits to check a field 'CopyIt'. If a record's 'CopyIt' value = true then it goes through the trigger. This works fine for copying multiple records at the same time into the same table. The issue is I have a field (ItemNum_Integer) in that table that needs to be sequentially ordered for each new record (sort of like an autonumber record but not set to that because sometimes the values start over for subrecordsets and have to be changed). So the first new, copied record's ItemNum_Integer value would be the Max of the existing ItemNum_Integer in that table (joined by a common ID number so it uses a sub-recordset) + 1. This works but ONLY for the first new, copied record. Every record thereafter uses the same value. So if I copy 5 records the first record will have the correct Max ItemNum_Integer + 1 value but then each record after it will use the same number. For example, if the first new/copied record has a Max ItemNum_Integer + 1 value of 106 then each of the five new records repeats 106 for their ItemNum_Integer value when they need to be 106, 107, 108, 109, 110 respectively. It seems like somehow the Max ItemNum_Integer + 1 isn't firing sequentially. Does anyone know how to do this?
  2. Hello, Does anyone know how to get and use the system date/time (the local computer's date/time and not a UTC value) in a table's triggered actions, and then use it? I have a table that logs activity from other tables and need to be able to log the user's local system date/time upon insert. The function SysDateTime() isn't available in a table's formula field and I'm not sure how/if I can use SysDateTime() to populate a date/time field in the table upon insert. In the Activity table's Upon Insert trigger, it would be something like a date/time field: Created_Local=SysDateTime() in the trigger's Set section (Update #inserted). I need to store both the local system date AND the time in this field. I can't use a UTC date (the normal TimeStamp method) because my users are all over the globe and the date/time wouldn't make sense to them without calculations. I need to use the local computer's system date. I also don't want to have to create a new field in each table that does an 'Insert Into' the Activity table upon their own Insert Data as there are many of these tables and I'd have to put the local system date/time field in a lot of submission pages (to be able to use SysDateTime() since it's not available in a formula field). So to me the simplest solution is to somehow update Activity table's field "Created_Local" with SysDateTime() upon insert of new data. Any help would be greatly appreciated!
  3. I have two tables. In the top table I have data pulling in to the table using API calls. It currently pulls in the ID number of the location and not the locations Name. I would like the ID number to change to the store location name as soon as it hits the table using the bottom left table that shows the Store name and the ID associated with the name. The bottom right table shows what I would like is to have the top table Page_ID field to be replaced by the ID in the bottom table. The final result would be what the bottom right table would like like. I tried a trigger but I couldn't figure out how to make it work.
  4. I have many projects and each project has many tasks. Each time we start a new project staff spend hours loading in all the tasks. In very many cases we already have a project where the tasks are very similar. If the staff could copy/duplicate the tasks from the similar project and just replace the project_id with the project_id of the new project, then the team could save hours by just adjusting the tasks that were different. I have a Table TBL_Project_Tasks and it holds the tasks for all projects. Each record holds Task_id; Project_id; Task Description; Task_sequence; Task comment and some other fields that are not important. I have a simple Datasheet that I created and it writes to a new second Table TBL_New_Projects. It has User-id and time_stamp (for records only); Copy_from_Project_id; Copy_to_Project_id. I wanted to create a trigger in TBL_New_Projects so that when a new record was inserted into TBL_New_Projects, all the records in TBL_Project_Tasks where the Project_id = Copy_from_Project_id were duplicated but with the Project-id replaced by Copy_to_Project_id. The team can just use our regular ‘Edit_Task’ datapage to adjust any tasks they need I have spent hours with the Triggered action and it seems I just do not have the knowledge to make this work ( I am a beginner after all). Can you help??
  5. Hi guys, I have what will probably be a simple question but I can't seem to work it out. Essentially I have a Checkbox called ConstructionContractAvailable? and what I would like to have happen is when a field called Prime Contractor is not blank that Checkbox will uncheck. All of this is in the same table and datapage. When I try it I get the Recursive Call warning. All I want is when there are words in the section called Prime Contractor the checkbox unchecks itself. Is this possible? I've included a picture of what I did (that didn't work). Any advice would be great.
  6. Hi, I'm trying to populate multiple records, based on a single record selection and submittal. I have 3 data pages involved in this process. I'll change some of the naming-convention from my industry-specific jargon to make a bit more sense: Data Page 1: Team Name, Employee, Title In the first data page the user organizes their employee's into different Teams. Each team is given a name and there are usually 4 to 5 employee's on each team who each have their own title. For example, Team 1 may have: > Billy - Team Lead > Bobby - Organizer > Jane - Recruiter > Jim - Record Keeper Data Page 2: Project Name, Team Name, Hours Worked On the second Data Page, the user is asked to enter their project name, and the select a team name from the dropdown menu. The team name dropdown menu is a cascading dropdown field that pulls the list of team names established from the first data page. In this Project, the only available team to select is Team 1 with Billy, Bobby, Jane, and Jim. After the user makes this selection, they enter the # of hours worked for the team. For this Project, we will say each team member worked 2 hours. So the user would enter "2" into the hours worked field and hit submit. Data Page 3: Employee, Assignment, Hours Worked After clicking submit on DataPage 2, I'd like the 3rd DataPage to populate the team member names from the team name selected and insert 2 hours for each employee. The user can then preview and confirm this information before exiting the DataPage. If one of the employee's only had 1 hour on the project, they would then be able to edit one of the team members hours to reflect this. So far, I have created a trigger, where the user can enter the project name, and number of hours, which will then populate the 3rd data page, but I haven't quite figured out how to lookup and insert records for each employee under the team name selected. Any help would be greatly appreciated! This is my first forum posting, so please advise if I should attach more detail or modify my question in any way. Thanks in advance.
  • Create New...