Hi,
I'm having some issues with a Canvas App I've created linked to Dataverse.
Table: Table1
Columns: Place (Lookup at table Places), Vehicle (Lookup at table Vehicles), Date, Complete (Yes/No), Remark (Text)
The app consists of 2 comboboxes (place, vehicle), a date field, a checkbox and a textfield and a big button to submit.
The comboboxes only allow 1 selection.
In the OnSelect of the submitbutton, I have the following:
Patch(Table1, Defaults(Table1), {
Place: cmbPlace.Selected,
Vehicle: cmbVehicle.Selected,
Date: dtpDate.SelectedDate,
Complete: chkComplete.Value,
Remark: txtRemark.Text})
Everything works like a charm when everything is filled in. But if Place and/or Vehicle is empty it won't create a new record in Table1.
I've tried several things, such as: If((IsBlankOrError(cmbVehicle.Selected) || IsEmpty(cmbVehicle.Selected)), Set(varVehicle, {}), Set(varVehicle, cmbVehicle.Selected) or If((IsBlankOrError(cmbVehicle.Selected) || IsEmpty(cmbVehicle.Selected)), Set(varVehicle, Blank()), Set(varVehicle, cmbVehicle.Selected).
Can someone help me, please? 😋