What I would like to do is set the default number based off the drop down menu above it.
-
Set the form flag UpdateDataOnChange.
-
Do not set the
Value
property of the lookuppopup so you can extract the whole row data. -
Execute code in the
Change
event:${this.form0.form.patchValue({Quantity: event.value.Quantity})}
with the condition${event.property == 'PO_ID'}
. -
Execute code in the
Change
event:${this.form0.form.patchValue({PO_ID: event.value.PO_ID})}
with the condition${event.property == 'PO_ID'}
Step 4 is to set the value property back to PO_ID only and not the whole row data. You can, as well, instead of patchValue
in the Change
event, Object.assign({}, ${event}, {Quantity: this.quantityProperty})
in the Submit
event.
Which property needs to be set on the change event on step 1? Leaving it blank, generates an error message. skipping that part of step 1 seems to also work.
step 4: a pair {} was missing but I figured that part out, after it generated an error message.
Thank-you very much! Project is working as intended now.
Yes, that part about setting a property in Step 1 was wrong, I forgot to remove it. I modified my answer to inlcude the missing {} as well.