This tutorial shows how to develop an application for providing users to define a new product, to submit purchasing requests, and follow all requests from the dashboard. Also in this application, users with administrative authority would decide to approve or reject the purchase request.
▶️ Watch Now: Purchasing Request Management
──────────────────────────────
Design Your Application
In this example, we will create 9 different forms to cover functionality:
Department Entry: Form to be created for the department entries.
Title Entry: Form to be created for the title entries.
Parameters: Form to be created for parameters.
User Entry: Form to be created for the user entries.
Product Entry: Form to be created for the product entries.
Request Entry: Form to be created for the request entries.
Flow: To edit the flow of the created form
Confirmation Screen Report: Form to be created for the confirmation screen report.
Dashboard: To show the dashboard of all forms created
──────────────────────────────
Please keep in mind, Xpoda Studio will create fields at the database right after you click the ‘’ Save ’’ button from the toolbar. To be sure, use the‘’ Save ’’ button frequently or you may lose data.
Developing Application
Now that we designed our application data and UI, it is time to develop the application using XPoda Studio. Login to XPoda Studio and add a new form.
──────────────────────────────
Department Entry Form
Department: To defining a department for users
Department_List: To show off departments that are submitted by someone
Add a new form and name it " Department Entry ". From the tool bar add "Department”, "Department_List”.
Firstly, we should give a name to our table and name it as “RM_DEPARTMENT_ENTRY” and also above the table name you should see the name and type in that field “Department_Entry”.
Actions in This form
We want to show all departments when the form opened. When the “Department_Entry” name selected you need to click "Add New Action" to do this. Type of Action should be " When the form is opened". Operation will be " Update value" and Value area will be “Departmen_List” because we want to show off departments in list.
Department Field
Now we’re going to add a Text Box to define a department name. First, add a text box and name it as “Department” in both fields.
Department_List Field
After that, we continue adding the List and name it as “Department_List” to show records.
In SQL query enter following query;
SELECT RM_DEPARTMENT_ENTRY.UserTableID, RM_DEPARTMENT_ENTRY.Department
FROM
dbo.RM_DEPARTMENT_ENTRY WITH (NOLOCK)
Actions in This field
When any row is selected, we could update form. When the “Department_List” field selected you need to click "Add New Action" to do this. Type of Action should be "When the value changes". Operation will be “Update value”. area will be “all forms” because when users click any row we need to update all form and show off record.
In query box enter following query;
SELECT ‘$PUserTableID’ AS UserTableID
(Please don’t forget to hit save button on the same pane and on the top of the software to save everything in the form.)
- Let's save and run our app to see changes/newly added forms. -
──────────────────────────────
- Title: Title for users.
- Manager: Managers title.
- Title_List: Titles that are submitted by someone.
Add a new form and name it " Title Entry ". From the toolbar add " Title”, " Title_List”.
Firstly, we should give a name to our table and name it as “RM_TITLE_ENTRY” and also above the table name you should see the name and type in that field “Title_Entry”.
Actions in This form
- We want to show all titles when the form opened. When the “Title_Entry” name selected you need to click "Add New Action" to do this. Type of Action should be " When the form is opened". Operation will be " Update value" and Value area will be “Title_List” because we want to show off titles in list.
Title Field
Now we’re going to add a Text Box to define a title name. First, add a text box and name it as “Title” in both fields.
Manager Field
Also we’re going to add a Check Box to define the manager title. First, add a check box and name it as “Manager” in both fields.
Title_List Field
After that, we continue adding the List and name it as “Title_List” to show records.
In SQL query enter following query;
SELECT RM_TITLE_ENTRY.UserTableID, RM_TITLE_ENTRY.Title, RM_TITLE_ENTRY.Manager
FROM
dbo.RM_TITLE_ENTRY WITH (NOLOCK)
Actions in This field
When any row is selected, we could update form. When the “Title_List” field selected you need to click "Add New Action" to do this. Type of Action should be "When the value changes". Operation will be “Update value”. area will be “all forms” because when users click any row we need to update all form and show off record.
In query box enter following query;
SELECT ‘$PUserTableID’ AS UserTableID
(please don’t forget to hit save button on the same pane and on the top of the software to save everything in the form.)
- Let's save and run our app to see changes/newly added forms. -
──────────────────────────────
Add a new form and name it "Parameters". From the tool bar add "Department”, "Title", “Limit”, " Parameter_List”. Please notice Limit field must be numeric.
Firstly, we should give a name to our table and name it as “RM_PARAMETERS” and also above the table name you should see the name and type in that field “Parameters”.
Actions in This form
- We want to show all records when the form opened. When the “Parameters” name selected you need to click "Add New Action" to do this. Type of Action should be " When the form is opened". Operation will be " Update value" and Value area will be “Parameter_List” because we want to show off limit of titles in list.
Department Field
After that, we continue adding the Drop Down Box and name it as “Department” to choose department.
In SQL query enter following query;
SELECT RM_DEPARTMENT_ENTRY.UserTableID, RM_DEPARTMENT_ENTRY.Department
FROM
dbo.RM_DEPARTMENT_ENTRY WITH (NOLOCK)
Title Field
We continue adding the Drop Down Box and name it as “Title” to choose title.
In SQL query enter following query;
SELECT RM_TITLE_ENTRY.UserTableID, RM_TITLE_ENTRY.Title
FROM
dbo.RM_TITLE_ENTRY WITH (NOLOCK)
Limit Field
We will use this field to limit amount of title. In order to do that, we need to add a Numeric Box and name it as “Limit” in the left field.
Parameter_List Field
After that, we continue adding the List and name it as “Parameter_List” to show records.
In SQL query enter following query;
SELECT RM_PARAMETERS.UserTableID, RM_DEPARTMENT_ENTRY.Department,
RM_TITLE_ENTRY.Title, RM_PARAMETERS.Limit FROM dbo.RM_PARAMETERS WITH (NOLOCK)
LEFT OUTER JOIN dbo.RM_DEPARTMENT_ENTRY WITH (NOLOCK) on
RM_PARAMETERS.Department = RM_DEPARTMENT_ENTRY.UserTableID LEFT OUTER JOIN
dbo.RM_TITLE_ENTRY WITH (NOLOCK) on RM_PARAMETERS.Title = RM_TITLE_ENTRY.UserTableID
Actions in This field
When any row is selected, we could update form. When the “Parameter_List” field selected you need to click "Add New Action" to do this. Type of Action should be "When the value changes". Operation will be “Update value”. area will be “all forms” because when users click any row we need to update all form and show off record.
In query box enter following query;
SELECT ‘$PUserTableID’ AS UserTableID
(please don’t forget to hit save button on the same pane and on the top of the software to save everything in the form.)
- Let's save and run our app to see changes/newly added forms. -
──────────────────────────────
- First_Name: User’s first name
- Last_Name: User’s surname
- DOB: Date of birth
- Gender: User's gender
- Telephone: User’s phone number
- E_Mail: User’s email address
- Department: Department for users
- Title: Title for users
- Xpoda_User: To choose user for application
Add a new form and name it "User_Entry". From the tool bar add " First_Name”, " Last_Name”, "DOB”, "Gender”, "Telephone”, "E_Mail”, “Department”, “Title”, “Xpoda_User”. Please notice DOB is a date field.
Firstly, we should give a name to our table and name it as “RM_USER_ENTRY” and also above the table name you should see the name and type in that field “User_Entry”.
Actions in This form
- We want to show off all records when form is opened. So we will add action to update the user entry list. When the “User_Entry” name selected you need to click "Add New Action" to do this. Type of Action should be " When the form is opened". Operation will be " Update value" and Value area will be “User_List”.
First Name Field
We’re going to add a Text Box to define a First name. First, add a text box and name it as “First Name” in both fields.
Last Name Field
We’re going to add a Text Box to define a Last name. First, add a text box and name it as “Last Name” in both fields.
DOB Field
We’re going to add a Date to define a date of birth. First, add a date and name it as “DOB” in both fields.
Gender Field
We’re going to add a Drop Down Box to define a gender of user. First, add a drop down box and name it as “Gender” in both fields.
In Values (Text*Value) enter following query;
Male*Male
Female*Female
Other*Other
Telephone Field
We’re going to add a Text Box to define a phone number of user. First, add a text box and name it as “Telephone” in both fields.
E Mail Field
We’re going to add a Text Box to define a e mail of user. First, add a text box and name it as “E Mail” in both fields.
Department Field
We’re going to add a Drop Down Box to choose a department. First, add a drop down box and name it as “Department” in both fields.
In SQL Query enter following query;
SELECT RM_DEPARTMENT_ENTRY.UserTableID, RM_DEPARTMENT_ENTRY.Department
FROM
dbo.RM_DEPARTMENT_ENTRY WITH (NOLOCK)
Title Field
We’re going to add a Drop Down Box to choose a title. First, add a drop down box and name it as “Title” in both fields.
In SQL Query enter following query;
SELECT RM_TITLE_ENTRY.UserTableID, RM_TITLE_ENTRY.Title FROM dbo.RM_TITLE_ENTRY WITH
(NOLOCK)
Xpoda_User Field
We’re going to add a Drop Down Box to choose a xpoda user. First, add a drop down box and name it as “Xpoda User” in both fields.
In SQL Query enter following query;
SELECT XPODA_CLIENT_USERS.UserID, XPODA_CLIENT_USERS.UserFullName
FROM
dbo.XPODA_CLIENT_USERS WITH (NOLOCK)
User_List Field
Now we want to show off all records. In order to do that we need to list from the tool box and name it as “User_List”.
In SQL query enter following query;
SELECT RM_USER_ENTRY.UserTableID, RM_USER_ENTRY.First_Name AS [First Name],
RM_USER_ENTRY.Last_Name AS [Last Name], RM_DEPARTMENT_ENTRY.Department,
RM_TITLE_ENTRY.Title, XPODA_CLIENT_USERS.UserFullName AS [Xpoda User] FROM
dbo.RM_USER_ENTRY WITH (NOLOCK) LEFT OUTER JOIN dbo.RM_DEPARTMENT_ENTRY WITH
(NOLOCK) on RM_USER_ENTRY.Department = RM_DEPARTMENT_ENTRY.UserTableID LEFT OUTER
JOIN dbo.RM_TITLE_ENTRY WITH (NOLOCK) on RM_USER_ENTRY.Title =
RM_TITLE_ENTRY.UserTableID LEFT OUTER JOIN dbo.XPODA_CLIENT_USERS WITH (NOLOCK) on
RM_USER_ENTRY.Xpoda_User = XPODA_CLIENT_USERS.UserID
Actions in This Field
When any row is selected, we could update form. When the “User_List” field selected you need to click "Add New Action" to do this. Type of Action should be "When the value changes". Operation will be “Update value”. area will be “all forms” because when users click any row we need to update all form and show off record.
In query box enter following query;
SELECT ‘$PUserTableID’ AS UserTableID
(please don’t forget to hit save button on the same pane and on the top of the software to save everything in the form.)
- Let's save and run our app to see changes/newly added forms. -
──────────────────────────────
- Name: Name of product
- Price: Price of product
- Product_List: Products that are submitted by someone
Add a new form and name it "Product Entry". From the tool bar add "Name”, “Price”, "Product_List”. Please notice Price field must be numeric.
Firstly, we should give a name to our table and name it as “RM_PRODUCT_ENTRY” and also above the table name you should see the name and type in that field “Product_Entry”.
Actions in This form
- We want to show all products when the form opened. When the “Product_Entry” name selected you need to click "Add New Action" to do this. Type of Action should be " When the form is opened". Operation will be " Update value" and Value area will be “Product_List” because we want to show off departments in list.
Name Field
Now we’re going to add a Text Box to define a product name. First, add a text box and name it as “Name” in both fields.
Price Field
After that we’re going to add a Numeric Box to define a price. First, add a numeric box and name it as “Price” in both fields.
Product_List Field
Finally, we continue adding the List and name it as “Product_List” to show records.
In SQL query enter following query;
SELECT RM_PRODUCT_ENTRY.UserTableID, RM_PRODUCT_ENTRY.Name,
RM_PRODUCT_ENTRY.Price FROM dbo.RM_PRODUCT_ENTRY WITH (NOLOCK)
Actions in This field
When any row is selected, we could update form. When the “Product_List” field selected you need to click "Add New Action" to do this. Type of Action should be "When the value changes". Operation will be “Update value”. area will be “all forms” because when users click any row we need to update all form and show off record.
In query box enter following query;
SELECT ‘$PUserTableID’ AS UserTableID
(please don’t forget to hit save button on the same pane and on the top of the software to save everything in the form.)
- Let's save and run our app to see changes/newly added forms. -
──────────────────────────────
Fields
- ID: ID number for record
- Responsible: User who created the request
- Department: User's department who created the request
- Title: User's title who created the request
- Amount: Total price of added products
- Product Name: To choose product
- Qty: To type how many product to request
- Unit Price: Product’s unit price
- Total Price: Calculate total product’s price
Detail Fields
- ID: Show added product’s ID
- Product Name: Show added product’s name
- Qty: Show added Qty
- Unit Price: Show added product’s unit price
- Total Price: Calculate total price in row
Buttons
Submit: Add the selected product to the detail list
Add a new form and name it "Request_Entry". From the tool bar add “ID”, " Responsible”, “Department”, “Title”, “Amount”, ”Product Name”, “Qty”, “Unit Price”, “Total Price”, “Submit”. Please notice ID, Amount, Qty, Unit Price and Total Price are must be numeric.
Firstly, we should give a name to our table and name it as “RM_REQUEST_ENTRY” and also above the table name you should see the name and type in that field “Request_Entry”.
Actions in This form
- We want to define a uniq ID for any record. So we will add action to update ID field when the form is opened. When the “Request_Entry” name selected you need to click "Add New Action" to do this. Type of Action should be " When the form is opened". Operation will be " Update value" and Value area will be “ID”.
In SQL field enter following query;
SELECT ISNULL(MAX(RM_REQUESTS.UserTableID),0)+1
FROM
dbo.RM_REQUESTS WITH (NOLOCK)
- We want to show off user who is opened the form. So we will add action to update the Responsible. When the “Request_Entry” name selected you need to click "Add New Action" to do this. Type of Action should be " When the form is opened". Operation will be " Update value" and Value area will be “Responsible”.
In SQL field enter following query;
SELECT ‘$PActiveUser$’
Authority in This form
- We want the calculation and user information not to be changed. So we will add authority for the form. When the “Request_Entry” name selected you need to click "Add New Authority " to do this. Type of Authority should be "It can not change fields". Users Type will be "All Users". Fields will be “ID”, “Responsible”, “Department”, “Title”, “Amount”, “Unit Price”, “Total Price”.
ID Field
We’re going to add a Numeric Box to define a uniq ID. First, add a numeric box and name it as “ID” in both fields.
Responsible Field
We’re going to add a Drop Down Box to record create user. First, add a drop down box and name it as “Responsible” in both fields.
In SQL field enter following query;
SELECT XPODA_CLIENT_USERS.UserID, XPODA_CLIENT_USERS.UserFullName
FROM
dbo.XPODA_CLIENT_USERS WITH (NOLOCK)
Actions in this field
- We want to show user’s department in this form. So we will add action to update department field when responsible field is changed. When the “Responsible” name selected you need to click "Add New Action" to do this. Type of Action should be " When the value changes". Operation will be " Update value" and Value area will be “Department”.
In SQL field enter following query;
SELECT RM_USER_ENTRY.Department
FROM
dbo.RM_USER_ENTRY WITH (NOLOCK)
WHERE RM_USER_ENTRY.Xpoda_User = '$PResponsible'
- We want to show user’s title in this form. So we will add action to update title field when responsible field is changed. When the “Responsible” name selected you need to click "Add New Action" to do this. Type of Action should be " When the value changes". Operation will be " Update value" and Value area will be “Title”.
In SQL field enter following query;
SELECT RM_USER_ENTRY.Title FROM dbo.RM_USER_ENTRY WITH (NOLOCK)
WHERE
RM_USER_ENTRY.Xpoda_User = '$PResponsible'
Department Field
We’re going to add a Drop Down box to show off user’s department. First, add a drop down box and name it as “Department” in both fields.
In SQL field enter following query;
SELECT RM_DEPARTMENT_ENTRY.UserTableID, RM_DEPARTMENT_ENTRY.Department
FROM
dbo.RM_DEPARTMENT_ENTRY WITH (NOLOCK)
Title Field
We’re going to add a Drop Down box to show off user’s title. First, add a drop down box and name it as “Title” in both fields.
In SQL field enter following query;
SELECT RM_TITLE_ENTRY.UserTableID, RM_TITLE_ENTRY.Title FROM dbo.RM_TITLE_ENTRY WITH
(NOLOCK)
Amount Field
We’re going to add a Numeric Box to calculate total price in list. First, add a numeric box and name it as “Amount” in both fields.
Actions in this field
- We want to calculate total price in list. So we will add action to update amount field when a new row added. When the “Amount” name selected you need to click "Add New Action" to do this. Type of Action should be " When the value changes". Operation will be " calculate". Calculate should be “sum(Total)”
Product Name Field
We’re going to add a Drop Down Box to choose a product. First, add a drop down box and name it as “Product Name” in both fields.
In SQL Query enter following query;
SELECT RM_PRODUCT_ENTRY.UserTableID, RM_PRODUCT_ENTRY.Name FROM
dbo.RM_PRODUCT_ENTRY WITH (NOLOCK)
Actions in this field
- We want to show product’s unit price. So we will add action to update unit price field when product name field is changed. When the “Product Name” name selected you need to click "Add New Action" to do this. Type of Action should be " When the value changes". Operation will be " Update value" and Value area will be “Unit Price”.
In SQL field enter following query;
SELECT RM_PRODUCT_ENTRY.Price FROM dbo.RM_PRODUCT_ENTRY WITH (NOLOCK)
WHERE
RM_PRODUCT_ENTRY.UserTableID = '$PProduct_Name'
Qty Field
We’re going to add a Numeric Box to write how many units to request. First, add a Numeric box and name it as “Qty” in both fields.
Actions in this field
- We want to show product’s total price. So we will add action to update total price field when Qty field is changed. When the “Qty” name selected you need to click "Add New Action" to do this. Type of Action should be " When the value changes". Operation will be “Mathematical Operations" and Linked field will be “Total_Price”. Calculate field should be “ '$PQty$' * '$PUnit_Price$' “
Unit Price Field
We’re going to add a Numeric Box to show off product’s unit price. First, add a numeric box and name it as “Unit Price” in both fields.
Total Price Field
We’re going to add a Numeric Box to show off product’s total price. First, add a numeric box and name it as “Total Price” in both fields.
Submit Button
Now we’re going to add a Button to add row in detail list. First, add a button and name it as “Submit”.
Actions in this field
- We want to add row in detail list. So we will add action to mapping to detail list when submit button clicked. When the “Submit” name selected you need to click "Add New Action" to do this. Type of Action should be " When clicked ". Operation will be “Grid - Add Row ".
In mapping field enter follow text ;
ID = Product_Name
Name = Product_Name_Text
Qty = Qty
UnitPrice = Unit_Price
Total = Total_Price
Detail List Fields
- ID Field
After that we’re going to add a grid to record product’s information. First, click “Add New Field” button that is on the grid and choose Type of field will be “Integer”. Display name and field name will be “ID” and format should be same to type of field. Please notice “It can be changed” area must be “No”. After that clicked save button in Grid Area Operations.
- Name Field
We’re going to add a new field in grid area operations. First, click “Add New Field” button that is on the grid and choose Type of field will be “Text”. Display name and field name will be “Name” and format should be empty. Please notice “It can be changed” area must be “No”. After that clicked save button in Grid Area Operations.
- Qty Field
We’re going to add a new field in grid area operations. First, click “Add New Field” button that is on the grid and choose Type of field will be “Integer”. Display name and field name will be “Qty” and format should same to type of field. Please notice “It can be changed” area must be “No”. After that clicked save button in Grid Area Operations.
- Unit Price Field
We’re going to add a new field in grid area operations. First, click “Add New Field” button that is on the grid and choose Type of field will be “Integer”. Display name and field name will be “Unit Price” and format should same to type of field. Please notice “It can be changed” area must be “No”. After that clicked save button in Grid Area Operations.
- Total Field
Finally we’re going to add a last field in grid area operations. First, click “Add New Field” button that is on the grid and choose Type of field will be “Integer”. Display name and field name will be “Total” and format should same to type of field. Please notice “It can be changed” area must be “No”. After that clicked save button in Grid Area Operations.
(please don’t forget to hit save button on the same pane and on the top of the software to save everything in the form.)
- Let's save and run our app to see changes/newly added forms. -
──────────────────────────────
- Document: Form where the flow will run
- Start: To start flow
- Create Document: Decide line record delete or save
- Delete: Record delete to flow continuation
- End: Record is deleted and flow end
- Decision: Decide line to send approval or completed
- Send to Approval: Send request to decide user
- Complited: Record is complited and flow end.
- DecisionQuery: Decide with query in decision field
We’re going to open flow screen and seen "Document", "Start", "Create Document", "Delete", "End" fields. After that we'll connect fields with lines.
Document Field
Here we will decide on the form where we will use the flow. Text field will be “Document”. Document field should be choose “Request_Entry”. Please notice Auto start must be “Yes”.
Start Field
That field is starting tool. Text field will be “Start”.
Create Document Field
That field is decide to create or delete tool. After this area we have to determine where the lines will go. When document is saved flow is going to decision field. When document is deleted flow is going to delete field.
Delete Field
That field is delete tool. Text field will be “Delete”. When document is deleted flow will be select this line.
End Field
That field is end tool. Text field will be “End”. When document is deleted or rejected flow will be select this line.
DecisionQuery Field
We’ll add object tool. We’ll use that field to decide line about record in flow. Text field will be “DecisionQuery”. Flow is choosed send to approval when total amount of request more that responsible’s limit.
In SQL query enter following query;
SELECT CASE WHEN RM_TITLE_ENTRY.Manager=1 THEN 0 WHEN RM_TITLE_ENTRY.Manager=0
AND RM_PARAMETERS.Limit >= RM_REQUESTS.Amount THEN 0 ELSE 1 END AS SendManager
FROM dbo.RM_REQUESTS WITH (NOLOCK) LEFT OUTER JOIN dbo.RM_TITLE_ENTRY WITH
(NOLOCK) on RM_REQUESTS.Title = RM_TITLE_ENTRY.UserTableID LEFT OUTER JOIN
dbo.RM_PARAMETERS WITH (NOLOCK) on RM_REQUESTS.Department =
RM_PARAMETERS.Department and RM_PARAMETERS.Title = RM_REQUESTS.Title WHERE
RM_REQUESTS.UserTableID = '$PUserTableID'
Decision Field
We will add decision to flow. Flow is choosed "send to approval" when query result is returned 1. Otherwise, it will be automatically approved.
Send to Approval Field
We’ll add send to approval tool. We're going to choose user who will decide about request in users. Click to User Actions button and choose user in pop-up.
Complited Field
Finally we’ll add end tool and connect all lines between fields.
(please don’t forget to hit save button on the same pane and on the top of the software to save everything in the form.)
- Let's save and run our app to see changes/newly added forms. -
──────────────────────────────
Field
- Flow_List: Show off requests in flow (sent to approval)
Buttons
- Comment: Add comment in flow.
- Approve: Approve request
- Reject: Reject request
Add a new form and name it "Confirmation_Screen". From the tool bar add “Flow_List”, "Comment”, “Approve”, “Reject”, “Show Request”.
Firstly, we should give a name to our form and name it as “Confirmation Screen”. We’ll choose type as “Rapor”.
Actions in This form
- We want to show off all records in list. So we will add action to update Flow_List field when the form is opened. When the “Confirmation_Screen” name selected you need to click "Add New Action" to do this. Type of Action should be " When the form is opened". Operation will be " Update value" and Value area will be “Flow_List”.
Flow_List Field
We’re going to add a list to show off waiting requests. First, add a list and name it as “Flow_List” in both fields.
In SQL Query enter following query;
SELECT XPODA_WORK_FLOWS.FlowID AS [|FlowID], RM_REQUESTS.UserTableID,
RM_REQUESTS.ProjectID, RM_REQUESTS.FormTypeID, XPODA_CLIENT_USERS.UserFullName AS
Responsible, RM_REQUESTS.Amount FROM dbo.XPODA_WORK_FLOWS WITH (NOLOCK) LEFT
OUTER JOIN dbo.RM_REQUESTS WITH (NOLOCK) on XPODA_WORK_FLOWS.FlowDocumentID =
RM_REQUESTS.UserTableID LEFT OUTER JOIN dbo.XPODA_CLIENT_USERS WITH (NOLOCK) on
RM_REQUESTS.CreateUser = XPODA_CLIENT_USERS.UserID WHERE
XPODA_WORK_FLOWS.FlowProses = 'a23' AND XPODA_WORK_FLOWS.FlowState = '0' AND
XPODA_WORK_FLOWS.FlowUserID = '$PActiveUser'
Comment Field
We’re going to add a Text Box to add commet in flow. First, add a text box and name it as “Comment” in both fields.
Buttons
- Approve Button
We’re going to add a button to update flow in list. First, add a button and name it as “Approve” in both fields.
Actions in this field
- We want to update selected row in list. When the “Approve” name selected you need to click "Add New Action" to do this. Type of Action should be " When clicked". Operation will be " Update Flow". Description will be “Comment”. Type of Operation will be “Complete”. Linked List will be “Flow_List”. List ID Field will be “FlowID”.
- We want to remove row in list when row is approved. When the “Approve” name selected you need to click "Add New Action" to do this. Type of Action should be When clicked". Operation will be "Remove Line From List" and Linked List will be “Flow_List”.
Reject Button
We’re going to add a button to update flow in list. First, add a button and name it as “Reject” in both fields.
Actions in this field
- We want to update selected row in list. When the “Reject” name selected you need to click "Add New Action" to do this. Type of Action should be " When clicked". Operation will be " Update Flow". Description will be “Comment”. Type of Operation will be “Complete”. Linked List will be “Flow_List”. List ID Field will be “FlowID”.
- We want to remove row in list when row is approved. When the “Reject” name selected you need to click "Add New Action" to do this. Type of Action should be When clicked". Operation will be "Remove Line From List" and Linked List will be “Flow_List”.
Show Request Button
We’re going to add a button to update flow in list. First, add a button and name it as “Show Request” in both fields.
Actions in this field
- We want to show off row detail with pop-up. When the “Show Request” name selected you need to click "Add New Action" to do this. Type of Action should be " When clicked". Operation will be " Open Form (Detail)". Condition will be “In new window”. Project will be “Request Management Tutorial”. Form will be “Request Entry”. Linked list will be “Flow_List”. List Field ID will be “UserTableID”. List Type Field will be “FormTypeID”.
(please don’t forget to hit save button on the same pane and on the top of the software to save everything in the form.)
- Let's save and run our app to see changes/newly added forms. -
──────────────────────────────
- Request_List: Show off complited requests.
- Department_Chart: Show off complited requests by departments.
- Title_Chart: Show off complited requests by Titles.
Add a new form and name it "Dashboard". From the tool bar add “Request_List”, "Department_Chart”, “Title_Chart”.
Firstly, we should give a name to our form and name it as “Dashbord”. We’ll choose type as “Rapor”.
Actions in This form
- We want to show off all records in list. So we will add action to update Request_List field when the form is opened. When the “Dashbord” name selected you need to click "Add New Action" to do this. Type of Action should be " When the form is opened". Operation will be " Update value" and Value area will be “Request_List”.
- We want to show off all records in chart by department. So we will add action to update Department_Chart field when the form is opened. When the “Dashbord” name selected you need to click "Add New Action" to do this. Type of Action should be " When the form is opened". Operation will be " Update value" and Value area will be “Department_Chart”.
- We want to show off all records in chart by titles. So we will add action to update Title_Chart field when the form is opened. When the “Dashbord” name selected you need to click "Add New Action" to do this. Type of Action should be " When the form is opened". Operation will be " Update value" and Value area will be “Title_Chart”.
Request_List Field
We’re going to add a list to show off complited requests. First, add a list and name it as “Request_List” in both fields.
In SQL Query enter following query;
SELECT RM_REQUESTS.UserTableID, RM_REQUESTS.ProjectID, RM_REQUESTS.FormTypeID,
RM_TITLE_ENTRY.Title, RM_DEPARTMENT_ENTRY.Department,
XPODA_CLIENT_USERS.UserFullName AS Responsible, RM_REQUESTS.Amount, CASE WHEN
XPODA_WORK_FLOWS.FlowItemText='Complited' THEN 'Approved' WHEN
XPODA_WORK_FLOWS.FlowItemText <>'Complited' THEN 'Rejected' ELSE 'Waiting' END AS Status
FROM dbo.RM_REQUESTS WITH (NOLOCK) LEFT OUTER JOIN dbo.RM_TITLE_ENTRY WITH
(NOLOCK) on RM_REQUESTS.Title = RM_TITLE_ENTRY.UserTableID LEFT OUTER JOIN
dbo.RM_DEPARTMENT_ENTRY WITH (NOLOCK) on RM_REQUESTS.Department =
RM_DEPARTMENT_ENTRY.UserTableID LEFT OUTER JOIN dbo.XPODA_CLIENT_USERS WITH
(NOLOCK) on RM_REQUESTS.Responsible = XPODA_CLIENT_USERS.UserID LEFT OUTER JOIN
dbo.XPODA_WORK_FLOWS WITH (NOLOCK) on RM_REQUESTS.UserTableID =
XPODA_WORK_FLOWS.FlowDocumentID AND RM_REQUESTS.ProjectID =
XPODA_WORK_FLOWS.FlowProjectID WHERE XPODA_WORK_FLOWS.FlowProses = 'a2'
Actions in This form
- We want to show off row detail. When the “Dashbord” name selected you need to click "Add New Action" to do this. Type of Action should be " When double clicked on row". Operation will be " Open Form (Detail)". Condition will be “In new window”. Project will be “Request Management Tutorial”. Form will be “Request Entry”. Linked list will be “Flow_List”. List Field ID will be “UserTableID”. List Type Field will be “FormTypeID”.
Department_Chart Field
We’re going to add a Graphic to show off complited records by department. First, add a Graphic and name it as “Department_Chart”. Text is as “Departments Amount”
In SQL Query enter follow query;
SELECT sum(RM_REQUESTS.Amount) as Amount, RM_DEPARTMENT_ENTRY.Department FROM
dbo.RM_REQUESTS WITH (NOLOCK) LEFT OUTER JOIN dbo.RM_DEPARTMENT_ENTRY WITH
(NOLOCK) on RM_REQUESTS.Department = RM_DEPARTMENT_ENTRY.UserTableID GROUP BY
RM_DEPARTMENT_ENTRY.Department
Title_Chart Field
We’re going to add a Graphic to show off complited records by titles. First, add a Graphic and name it as “Title_Chart”. Text is as “Titles Amount”
In SQL Query enter follow query;
SELECT sum(RM_REQUESTS.Amount) as Amount, RM_TITLE_ENTRY.Title FROM
dbo.RM_REQUESTS WITH (NOLOCK) LEFT OUTER JOIN dbo.RM_TITLE_ENTRY WITH (NOLOCK) on
RM_REQUESTS.Title = RM_TITLE_ENTRY.UserTableID GROUP BY RM_TITLE_ENTRY.Title
(please don’t forget to hit save button on the same pane and on the top of the software to save everything in the form.)
- Let's save and run our app to see changes/newly added forms. -