Hi all
I know this one is going to be easy and I feel like I'm right there but I can't quite figure out how to achieve what I'm trying to achieve.
I have a app that is going to record fuel purchases.
I have some fields that I want to be "required" before submission is allowed.
On top of that, I have one field that, if left blank, I want it to patch the number "0" to Sharepoint, if it has a number entered, I want it to patch that number. I know I can default this text input to zero but I'd rather not if I can help it.
I think I may need nested If statements but I can't figure out how to make it work after many iterations of the code.
The app looks like this:

And the current code is like this:
If(!IsBlank(RegoLabel) && !IsBlank(KMsTextInput) && !IsBlank(FuelTextInput) && !IsBlank(CostTextInput) && AdBlueTextInput.Text = "",
Patch(FuelRegister, Defaults(FuelRegister), {Driver: DriverLabel.Text, Vehicle: VehicleSelectDropdown.Selected, Rego: RegoLabel.Text, Kilometres:Value (KMsTextInput.Text),Fuel:Value (FuelTextInput.Text), AdBlue: 0.0, TotalCost:Value (CostTextInput.Text)}),
Patch(FuelRegister, Defaults(FuelRegister), {Driver: DriverLabel.Text, Vehicle: VehicleSelectDropdown.Selected, Rego: RegoLabel.Text, Kilometres:Value (KMsTextInput.Text),Fuel:Value (FuelTextInput.Text), AdBlue:Value (AdBlueTextInput.Text), TotalCost:Value (CostTextInput.Text)}))
;UpdateContext({PopUp: true})
This is not doing what I need it to as it will patch the second set of data if any of the first conditions are not met which isn't what I want.
Any help you can give me would be much appreciated.
Thank you 🙏