Update Database
Hello Experts,
I am quite new to Agilepoint so please bear with my question. I am currently exploring on how to perform update functions on the SQL server using AgilePoint, this is in terms of adding, deleting and editing, and i am using a process-based app. I am hitting a wall with the editing function, I have tried to emulate what other posts' have done - Initialize loop and update record activity, datagrid and batch insert activity, repeating subform and the like. But it isn't reflecting the changes in my SQL server. I am starting to wonder if my own understanding is flawed, would be helpful if anyone can explain to me and show an example of performing updates to databases....thank you.
-
Hi Yuki,
Could you please check if any errors are showing up in the Manage Center or in the log files located at:
C:\Program Files\AgilePoint\AgilePointServerInstance\logThese logs often provide detailed insights into what's going wrong.
Also, you can refer to the official documentation for configuring database shapes in AgilePoint here:
https://documentation.agilepoint.com/9000/appbuilder/cloudenvShapesDatabase.html
Let me know if you find any specific errors.
Thanks,
Venkat -
Hi Yuki,
To perform update functions on Microsoft SQL Server using AgilePoint NX within a process-based app, you can use the built-in database activities available in the AgilePoint platform. These activities allow you to add, delete, and edit records in a SQL Server database.
The AgilePoint platform provides the following activities for interacting with SQL Server in process-based apps:
- Insert Record
- Update Record
- Delete Record
These activities are available under the Database tab in the Activity Library of the Process Builder.
Performing Update Functions
1. Insert Record
Use the Insert Record activity to add new records to a SQL Server table.
Configuration Steps:
1. Open Process Builder.
2. Go to the Activity Library and select the Database tab.
3. Drag the Insert Record activity onto your process.
4. Configure the activity as follows:
- Database Type : Select SQL Server.
- Database: Choose the access token for the SQL Server database.
- Schema: Select the appropriate schema.
- Table Name: Choose the target table.
- Column Name and Column Value: Define the columns and their corresponding values for the new record.
5. Save the configuration.For more details, refer to the [Insert Record activity](https://documentation.agilepoint.com/9000/appbuilder/cloudenvShapeInsertRecord.html).
2. Update RecordUse the Update Record activity to modify existing records in a SQL Server table.
Configuration Steps:
1. Open Process Builder.
2. Go to the Activity Library and select the Database tab.
3. Drag the Update Record activity onto your process.
4. Configure the activity as follows:
- Database Type: Select SQL Server.
- Database: Choose the access token for the SQL Server database.
- Schema: Select the appropriate schema.
- Table Name: Choose the target table.
- Condition (SQL Formula): Define the SQL WHERE clause to identify the records to update.
- Column Name and Value: Specify the columns and new values for the update.
5. Save the configuration.For more details, refer to the [Update Record activity](https://documentation.agilepoint.com/9000/appbuilder/cloudenvShapeUpdateRecord.html).
3. Delete Record
Use the Delete Record activity to remove records from a SQL Server table.
Configuration Steps:
1. Open Process Builder.
2. Go to the Activity Library and select the Database tab.
3. Drag the Delete Record activity onto your process.
4. Configure the activity as follows:
- Database Type: Select SQL Server.
- Database: Choose the access token for the SQL Server database.
- Schema: Select the appropriate schema.
- Table Name: Choose the target table.
- Condition (SQL Formula): Define the SQL WHERE clause to identify the records to delete.
5. Save the configuration.For more details, refer to the [Delete Record activity](https://documentation.agilepoint.com/9000/appbuilder/cloudenvShapeDeleteRecord.html).
Additional Considerations
- Access Tokens: Ensure you have configured a valid Access Token for Database to connect to your SQL Server instance. Access tokens store the necessary credentials and connection details securely.
- For more information, see [Access Token for Database](https://documentation.agilepoint.com/9010/admin/accesstokenDatabaseAccessToken.html).- SQL Server as Data Source: You can also use SQL Server as a primary data source for your process-based app. This allows you to build your app using the structure of the SQL Server database.
- For more information, see [Process-Based App with Database as the Data Source](https://documentation.agilepoint.com/9000/appbuilder/cloudenvProcessBasedAppDatabaseDataSourceParent.html).- Automated Actions: AgilePoint supports automated actions based on database events (e.g., triggering a process when a new row is inserted into a table). This is done using the Database Insert event service.
- For more information, see [Add New Event Service Screen > Database Insert Screen](https://documentation.agilepoint.com/9010/admin/cloudemDatabaseInsertPage.html).Hope this helps!
Thanks
-
Dear Venkat A.
thank you for your suggestion.. I am using a web-version, but will consider installing for this helpful log feature. As for any errors encountered, there is none, before then the changes just does not reflect in Agilepoint and my SQL Server.
Dear Bindhu,
thank you for your suggestions as well, and I have found a working method for my form. I am unable to persist editing aspect with datagrid. However, If i switch to using a repeating subform with just textboxes, and properly implement the activities (Insert/Update/Delete record) with the mapping, it is able to perform as expected. This is not ideal but at least it functions. Will try to figure out a better way for my situation.
Thank you experts...
請登入寫評論。
評論
3 條評論