Can't save an entry on an app without entering another field due to a Required_If constraint

I’ve created an app for my water utility company that’s used by our field techs to go read the water meters of our district residents. For the most part it works perfectly.The idea behind the Required_If formula I made, is to require a picture of the residents water meter read if it shows their usage as negative or twice the amount of their average usage. This prevents us from having to send out someone else to verify the read for a customer if their angry about their water bill. I’m having an issue however where if our field tech is unable to get their read and can’t enter it in(we make them usually type in the reason why in a text field), but with my new formula, it won’t let them save just a note unless they either enter in a false read or take a picture that’s not necessary. This is the formula that I’m using, which is attached to the “Picture” field:

IFS(
([Current Read] - [LastRead]) >= (([UsageAvg]/1000)*2),
ISBLANK([_THIS]),

 ([Current Read] - [LastRead]) < 0,
      ISBLANK([_THIS]),

 AND([Current Usage] = 0, [UsageAvg] > 0), 
      ISBLANK([_THIS]),

TRUE, ISNOTBLANK([_THIS])
)

Please help me figure out a way around this. I need a way to keep this, but to not require it if there is no read in the “Current Read” Field and just a note instead. If you need any more context or information, then just let me know and I’ll try my best. Thank you so much!

It would appear your Required_If expression could be simplified to:

OR(
  (([Current Read] - [LastRead]) >= (([UsageAvg] / 1000) * 2)),
  (([Current Read] - [LastRead]) < 0),
  AND(([Current Usage] = 0), ([UsageAvg] > 0))
)

You said:

That suggests a problem with the note column’s Valid_If expression rather than a problem with the Picture column’s Required_If.

1 Like

Thank you so much for your quick reply! The shortened expression works great! I do think I understand what you mean by the note’s columns Valid_If expression playing a role in fixing this issue, but I’m not quite sure how to go about creating an expression that would work within the bounds of the Required one. Which expression would you best suggest to use for the Valid_If for the note column, I’ve been experimenting with it, but still can’t come up with the solution to fixing it. Thank you again for helping me

It’s not clear to me that the note column would even need a Valid_If expression. Can you clarify?

Can you not add a Y/N column for access to read and take photo and then condition the require if (and show if) for meter reading and photo in relation to their answer?

I thought of something like that, but it would seriously slow them down considering we need just a few of our guys to read over 1,000 meters in a day to a day and a half. Plus they would complain like crazy for having to do one more step lol

I thought that was what you were saying, I was actually wondering what you were talking about reguarding a Valid_If expression. Right now, I have the formula working where it requires pics under certain circumstances, but there’s a weird instance where it requires a pic if you don’t enter in the [Current Read] row, but do enter text in the [Read Notes] row to explain why you couldn’t get the customers read(such as a gate or dogs etc.). I’m just stuck as to how fix that one problem but keep the rest correct. Thanks

Glad Steve was able to help you out!

Ryan, if you are interested in a quick session and we can address some of the ideas you had, feel free to book some time with me here. Your use case of field techs reporting water meters is a good one.

https://app.hubspot.com/meetings/billy42

Hi Ryan,
Would changing this

into

IF( ISNOTBLANK([Reason]), FALSE,
OR(
(([Current Read] - [LastRead]) >= (([UsageAvg] / 1000) * 2)),
(([Current Read] - [LastRead]) < 0),
AND(([Current Usage] = 0), ([UsageAvg] > 0))
)
)
work? The ‘Reason’ field here is the text field that your users need to fill in when they need to explain why they could not read any value.

If your users can read a value and enter that value, they are not required to take a picture unless your previous conditions require that - just like before.
If your users cannot read a value, they will specify the reason in the ‘Reason’ field which is not blank and this condition will return FALSE - meaning the picture is not required.

I’d recommend making sure that you have a Required_If statement for your ‘Reason’ text field too. You want to make sure your users give an explanation when the current read is missing, but you also want to make sure they cannot enter an explanation if they entered a current read value (otherwise they’re not required to take a picture!).
Let us know if that’s what you wanted.
Thanks

Thanks and yeah, I’ll try to book some time when I get the chance! There are actually quite a few other ideas I’m trying to implement that would really be big game changers for how we operate. Appsheet has been a huge asset to how our company operates and I personally really do love experimenting with it to make it even better!