How to add more data view row by row in a single page?

0
Hi team, I’m creating a medicine purchase bill functionality to entry all the medicine purchased from a supplier. All the medicine have to inserted row by row in the same page and whenever I click on calculate button, all the medicine price will be added and showed in the bottom part of the page. I have created the page but I can only enter a single object of PurchaseItem in the PurchaseBill page. In one  purchasebill object I have to store multiple purchaseitem objects. (When I click ‘Add item’  button there will be one more row of the purchaseitem dataview below the existing dataview). But all the purchaseitems need to be in a single page and when I save the data I will be able to save the purchasebill object along with the purchaseitems. There will be two entities : 1.PurchaseBill (The main entity where Purchase bill details like supplier name, purchase number, date, invoice number along with all the medicine purchased from a supplier will be stored) 2.PurchaseItems (These are the medicine items which will be stored)   This is the domain model I have created.     This is the reference I want to implement in my page.
asked
3 answers
5

Hi Subhrajit,

On the add purchase bill page, add an button to call a microflow which creates a new purchase item and link it to purchase bill, this way you can add multiple purchase_items as per your need .

this way you can add multiple purchase_items linked to a particular purchase_bill.

you can refer to this image,

 

 

 

 

 

 

 

 

Just tell if any problem occurs,

Hope it helps!

answered
0

Hi Subhrajit,

 

When you create an PurchaseItem, use a microflow to create the PurchaseItem and assign it to the PurchaseBill. Also, refresh the PurchaseBill. This should then add an empty line on your datagrid (assuming that the data source is by association).

 

Your save action would then also be an Microflow, where you retrieve by association the PurchaseItems on the PurchaseBill and commit everything.

 

Hope it helps!

answered
0

Hi,

 

Looking at your model, you will have to use a list view and not a data view to add up all your purchase items. That will get you started with being able to add more items as you shop. Then you will need to use microflows to manage your data.

answered