Creating a Custom Purchase Order App in Power Apps
HTML-код
- Опубликовано: 2 авг 2024
- This came from a question from one of you! And that was how to write multiple lines in Power Apps into 1 row into a data source. Our data source in this video was SharePoint because that is freely/easily available to me... But we wrote that one order into a multi-line text field as a HTML table.
Thank you for the questions!
We've successfully generated a purchase order using Power Apps, streamlining a procurement process with its user-friendly and efficient design. This technology empowers us to manage purchases more effectively and maintain better control over our expenditures.
Previous Videos that may be helpful:
Writing Gallery as HTML: • Convert a Gallery into...
Write Multiple Lines at one time: • Beginner Tutorial: How...
My name is Andrew Hess, please like & subscribe!
OnVisible:
ClearCollect(colItemOrder,{Item:"zshowbuttonvisible",Description:"",Quantity:0,Price:0})
OnSelect of Save Button:
Clear(colMyGallery);
ForAll(
Gallery1.AllItems,
Collect(
colMyGallery,
{
Item: TextInputCanvas2.Value,
Description: TextInputCanvas2_1.Value,
Quantity: TextInputCanvas2_2.Value,
Price: TextInputCanvas2_3.Value
}
)
);
Remove(
colMyGallery,
Last(colMyGallery)
);
Patch(
Order,
{
ContactPerson: TextInputCanvas1.Value,
Address: TextInputCanvas1_1.Value,
Items: "RUclips will not let me put HTML Here"
DeliveryDate:DatePickerCanvas1.SelectedDate
}
)
0:00 Introduction
1:48 The Setup
2:50 Setting up collection colItemOrder OnVisible
5:08 Creating a button in the last row of Gallery
7:00 Changing to zshowbuttonvisible
10:20 The SharePoint List - 4 columns
11:11 Recollecting our Gallery
12:25 Creating an HTML Table
15:48 Adding the HTML Table to our Patch
16:30 Demonstration Наука
You may be able to notice in the video, I made a small mistake with the description column, but I kinda skipped over the issue! 😀 But I did recognize it.
Jesus, man! You really made the video! Have all my gratitude for that. Tonight will be long with this content. Thanks again!
Hope it helps!
Hi Andrew, your videos have been very helpful for me to learn create an app. I am trying to create an input form for purchase order and save the data to SharePoint. I um unable to share a screenshot but basically the master details for a PO would have PO number, vendor name, approver, etc. The details part is where I add new lines via a button for Qty, unit price, Amount and would like to save each line to SharePoint in a separate row and copy same master data for each row. Would you be able to make a video to show how to do this? Thanks!
Hi Andrew, could you please share how to configure SharePoint View to show the html code as a table? In my list view the code is being showed as a text, despite of using rich text or not. Thanks!
Hi Marcus, I have run into this issue before, I would just try again. For some reason the rich text doesn't stick? Normally I just choose a multi-line text and turn rich enhanced text on in SharePoint.
Hi Andrew, This was very educational and really helped me alot thank you, the solution works perfect, but i have one request if possible, how can i retrieve the HTML formated table that we stored in the SharePoint column, for viewing and editing purposes. Thank you, this takes my power apps knowledge to next level
Hi Nora, it depends on how you want to use the data. If you just want to edit/view it, you can edit it in the SharePoint multi-line text field.
If you want to retrieve the HTML formatted table and edit it in Power Apps, this solution may not be the right choice, instead using a completely separate SharePoint list for the Items column may be a better choice.
You just need to have a way to connect the 2 SharePoint lists most likely using a primary key of some sort (ID).
Thank You for the multi line items entry screen idea. In case, if we want to retrieve and edit the saved line items, I think we have to make use of 'Split' and bind it to the individual text box inputs, right? Also, it would be nice if we can avoid the 'Add New Line' button and always present a blank row at the bottom of the grid ready for the input. Thank You so much.
These are great questions and great points, most likely yes you would have to split the html back up. I'm not sure exactly how I would do the Edit part. Maybe the best way to Edit is to not edit, and require a recreation of the entire order, and have a "Canceled" button on the line item that was a mistake or needed editing. A few options there too.
For the blank row that sounds totally possible, to always have a blank row at the end.
But for the blank row, when would it create the blank row, would you hit a submit button on the row? Would it do it on the OnChange property? A few questions there.
have you found a solution for your question, i'm also looking the same
Can you create a power app that links the purchase order app to the inventory management app?
Hi, this video helped me so much, thanks. I have an other problem, I have to search in a gallery, but just the collums that I mark in n group of check boxes. Like a gallery of food, and I have 3 check boxes, name, colour and taste, and one text input, and if I marked name, colour, I can search for name or colour. Its hard to set these check boxes in the Search formula. Please, if u could help me, I would be grateful.
Hi Guilherme, it could be possible, for your filters in your gallery you would use a variable and the checkboxes whether true or false would then change the variable in your Gallery Filter.
This is how you would do it, hard to explain in text, a video could be possible.
Hi Andrew! Great video. Please help me. Im trying to re-create so I can learn. I am stuck at the ColItemOrder part. When you referenced the part to the OnVisible of the screen how are referencing each field/textbox in your gallery with the controls? I'm having trouble and keep getting errors :(
To note here is a picture of how I named my text boxes txtItemInput1, txtInvInput1 (this is a choice in my sharepoint list etc. Any ideas on what I might be doing wrong? Thank you for any help you can provide.
Hi Ronnie, so the colItemOrder part that is just a trick that I do, I create a row and the first column I just populate it with something... in this case I populated it with "showbuttonvisible". The only reason I'm doing this is to create the button Add New Line Item there, you don't even need to do it this way. It was just a trick. Try skipping that part and not doing that button there for the " Add New Line" in the gallery. The fields are referenced later on. In the collection for colMyGallery.@@RonnieMorgan2011
Hope this helps, would love to help but sometimes difficult through youtube chat 😋@@RonnieMorgan2011
No worries thank you so much for your help & quick responses. I can provide my email if you like. I think somehow I figured it out (not sure how). Now my modern text boxes don't want to cooperate :(
Clear(ColItemOrder);
ForAll(Gallery3.AllItems,Collect(ColItemOrder,{Item:drpItemInput1Mod.Selected.Value,InventoryType:drpInvTypeMod.Selected.Value,Quantity: txtQtyInput.Value,Price:txtPriceInput.Value}))
Keep in mind I have used modern instead of classic on the text input boxes ...is that an issue possibly? I getting the red lines.
@@andrewhess123
Thanks, is there a way to show us a to print the order in html Invoice style?
I'll keep that in mind. But you would just create a new screen with a print button and put the html table on there with all the labels, then just make it look pretty.
Or you could create a Power Automate with a Word Template and then print. This would most likely require a premium Power Automate license.
@@andrewhess123 I did try but not success please keep in mind Thanks
How can i create a table column like in yout sharepoint list?
Hi Savio, It's a multi-line text field with Rich-text On
can you edit it on SharePoint or it has to be done in PowerApps. For example you put the wrong amount and notice it later after you saved it.@@andrewhess123
@@andrewhess123hello. Similar question. Do you have a video showing how you created the text boxes from the beginning?