Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 1190 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I had a user today who couldn't exit a new record (created on accident) because the Title field is set to require a value.  When I log in with the Full Access privilege set, I am given the option to revert the record or allow the field to remain blank.  If logging in with the user privilege set, those options are not given. 

I thought that the missing revert option was probably because the user privileges didn't include the ability to delete records.  I did some research and found that I could allow delete if the calculation Get (RecordOpenState) = 1 evaluates to true, meaning that it's a new record that hasn't been committed.  So now the delete button will allow the user to delete the new record. However, the "Revert Record" button still does not appear in the data validation error dialog, and I can't find anything that controls whether or not the user should be allowed to override the data validation during entry.

Anybody know?

Posted
20 minutes ago, eljefejb said:

I thought that the missing revert option was probably because the user privileges didn't include the ability to delete records.

No. Reverting a record is not the same as deleting a record. Users with permission to create and/or edit records also have permission to revert - even if they do not have permission to delete.

 

21 minutes ago, eljefejb said:

I can't find anything that controls whether or not the user should be allowed to override the data validation during entry.

image.png.66bb8b763fbb0f500cf1b171219daaf6.png

 

Posted

Thanks, comment!

The Users privilege set already had create and edit privileges, so it must be the checkbox that shows the "Revert" option.  Not sure how I didn't see that.  Tired eyes, I guess.  😴

The problem is that I want to allow reverting of a new record, but I don't want to allow users to override the data validation.  It seems to be all or nothing.  I'm tinkering with scripts to try to accomplish it.  So far, the best I've come up with is something like like this, attached to the layout trigger OnRecordCommit:

If [Get (RecordOpenState) = 1]
  If [Title = "" or Created_By = "" or Reason = ""]
    Show Custom Dialog["Values Required"; "Go back or Cancel Record?"]
    
    If [Get (LastMessageChoice) = 2]
      Revert Record/Request [With dialog: Off]
      Go to Layout ["View Details"; Animation: None]
    Else
      Exit Script [Text Result: True]
    End If
  End If
End If

I put a red "Cancel New Record" button on the layout, hidden unless Get (RecordOpenState) = 1 but the script fires any time the user clicks outside of a field, so it's really just a dummy target.  Not the most elegant solution, but it seems to work okay.

Thanks again for your help!

Posted
1 hour ago, eljefejb said:

I don't want to allow users to override the data validation.

Why don't you prevent this in the field's validation options?

 

Posted

I'm a dunce.  I'll blame it on the triple-digit heat and smoke in our area making me not see the obvious.  😄

In my defense, someone else created this particular file long before me, and I don't work with FileMaker all the time, so sometimes I forget all the settings. 

Thanks for getting me back on the right track!  Things are working nicely, now.

This topic is 1190 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.