Hi,

I am trying to create new items into my database. So in the form, users will have to input the name of the item and the prices (as shown in the form in my oml). However, as my price is in a separate entity as my item entity, whenever i save the form, the itemId in my "price" entity in the database is always zero (as shown in my database in the oml attached). How do i ensure that the itemId will not be zero? 

What i input in my form:

1. Item: chair, price: 56

2. Item: table, price: 90

You OML having some issue not able to open it.
Meanwhile did you check if ItemId generated in item table.



Salman Ansari wrote:

You OML having some issue not able to open it.
Meanwhile did you check if ItemId generated in item table.



Hi Salman,

I have attached some screenshots and yes in the item database, the itemId is generated.




Hi Jolene,

You should create a separate page for creating the item and here you should should use drop down down for selecting the item and then define the price n quantity and make ItemId mandatory in you Price entity.

Hope this helps.

Regards,

Manish Jawla

1.first call CreateItem action and insert record in Item table.
2.Take PK from CreateItem action
3.Set the FK itemId with the "CreateItem" step 2
4.Call CreatePrice action

Hi Jolene,

Have you tried to  add an assignment before CreatePrice and provide value as below.



Regard's

Lakshmi Kumar Yadav

Hi Jolene Kwek,

                 I have done some changes in your module. Kindly have a check on it and its working fine.

Thanks and regards,
Gnanavel Sivasankaran

Hi all those replied,

Thank you so much for all the help!! I will try out your suggestions.