cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dave373927
Frequent Visitor

How to create a record of what people have ordered into a Sharepoint list

So I am creating a shopping app were people can request equipment. It works well but I want to keep a record of the order history and am wanting to keep a record of what people have ordered in that one order. At the moment the app adds the products to the basket and then adds it to a list ,when people checkout, to create an order history of all the orders that have happened. I need to fill in the column that says items to show the person what people have ordered in their one request. I don't know how I would go about doing this. E.g. Someone has ordered 3 laptops and 2 towers this costs £5000 and the order number is Order 1353 and in the Sharepoint list it should say Title: Order 1353.          Cost: £5000           Items: 3 - Laptops

                                                                                                                                                                   2 - Towers

Any help would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Roverandom
Solution Supplier
Solution Supplier

You can create a record variable like this and patch the SharePoint list:

 

Set(
    gblEquipmentOrders,
    {
        OrderNumber: 1353, // generated automatically or not
        Equipment: "Laptop", // Dropdown.Selected.Title
        Quantity: 3, // TextInput.Text
        Cost: 5000 // UnityPrice.Text * TextInput.Text
    }
);

Patch(
    SPList,
    Defaults(SPList), // to create a new record, if updating an existing record, use Lookup(SPList, ID = myID), for example
    {
        Title: gblEquipmentOrders.OrderNumber,
        Cost: $"£{gblEquipmentOrders.Cost}",
        Items: $"{gblEquipmentOrders.Quantity} - {gblEquipmentOrders.Equipment}"
    }
)


Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.



Roverandom is a book by J.R.R Tolkien. I'm a big fan of his works and as Frodo, Aragorn or Gollum are already widely used, I decided to use this nickname.

View solution in original post

1 REPLY 1
Roverandom
Solution Supplier
Solution Supplier

You can create a record variable like this and patch the SharePoint list:

 

Set(
    gblEquipmentOrders,
    {
        OrderNumber: 1353, // generated automatically or not
        Equipment: "Laptop", // Dropdown.Selected.Title
        Quantity: 3, // TextInput.Text
        Cost: 5000 // UnityPrice.Text * TextInput.Text
    }
);

Patch(
    SPList,
    Defaults(SPList), // to create a new record, if updating an existing record, use Lookup(SPList, ID = myID), for example
    {
        Title: gblEquipmentOrders.OrderNumber,
        Cost: $"£{gblEquipmentOrders.Cost}",
        Items: $"{gblEquipmentOrders.Quantity} - {gblEquipmentOrders.Equipment}"
    }
)


Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.



Roverandom is a book by J.R.R Tolkien. I'm a big fan of his works and as Frodo, Aragorn or Gollum are already widely used, I decided to use this nickname.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (3,846)