Excel File Format

0
How can I create an employee expense claim details page in Excel with columns for serial number, date, category, description, amount, and optional image references? Additionally, how do I calculate the total expense amount for that particular employee's expense claim at the end of the table ? Like the screenshot I've mentioned below.
asked
2 answers
0

FIrst of all you need an Entity to store your data with necessary Attributes

if it is a static data you can use Table Widget, if some rows are dynamic then a Data Grid 1 or 2 can do the job. Alternatively you can go through a List View with some CSS/SASS customization.

Dynamically calculated fields can be obtained within Domain Model, Entity > Property (calculated value) or through Text Widget with expression or Data View with microflow logic

answered
0

Hi Dhanashree Parkhi,

Certainly! Let’s break down the steps to create an employee expense claim details page in Mendix:

  1. Create a New Page:

  2. Design the Page: (Use data grid 2 - Data Grid 2 | Mendix Documentation)

    • Add the necessary input fields to the page: serial number, date, category, description, amount, and an optional image reference.
    • You can use Mendix widgets like text boxes, date pickers, dropdowns, and file upload widgets to capture this information.
  3. Create a Microflow for Expense Submission:

    • Create a microflow that handles the submission of expense details.
    • When the user submits the form, the microflow should:
      • Create a new entity (let’s call it “ExpenseClaim”) to store the expense details.
      • Populate the attributes (serial number, date, category, description, amount, and image reference) based on user input.
      • Save the new expense claim entity.
  4. Calculate Total Expense Amount:

    • Extend the system to automatically calculate the total value of the expense report (sum of all expense items).
    • To achieve this:
      • Add an attribute called “TotalAmount” to the “ExpenseClaim” entity.
      • In the microflow that saves the expense claim, calculate the total amount by summing up the “Amount” attribute for all related expense items.
      • Set the “TotalAmount” attribute accordingly.
  5. Display the Expense Details:

    • On the expense claim details page, display the individual expense items along with their details (serial number, date, category, description, amount, and image reference).
    • Show the total expense amount at the end of the table.

Remember to adjust the specifics according to your application’s requirements. If you encounter any issues during implementation, refer to Mendix documentation (Welcome to Mendix Docs | Mendix Documentation) Happy building! 😊

 

answered