Make fields visible only when adding a NEW record, unless an admin who can always see them

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I have 3 fields that should be accessible by everyone when adding/creating a NEW record.  The person creating the record must choose an option when creating records only.  But once the record is saved we do not want everyone to be able to edit these fields after they are defined.

For records that are already created, these 3 fields must only be view-able & editable by people in the role of Administrator.

When trying form rules to hide these fields except for users in Admin role, the fields are also hidden in the ADD record mode...could not figure out a way to control which modes to apply the form rule to, and which not to.

Is there another way to do this?

Photo of troberge


  • 220 Points 100 badge 2x thumb

Posted 3 years ago

  • 0
  • 1
So one trick for this to set up a field called [Record ID# mirror] - a formula numeric field with the formula [Record ID#].

(for reasons unknown to me, it won't let you use the [Record ID#] field in form rules, so we cheat a bit).

That field will be blank in add mode as there is no Record ID# until you save.

The form rule could be

when multiple conditions are a true.

when any of

[Record ID#] mirror is not equal to (blank)

The user is in the Role Administrator


Show field 1

Show field 2

Show field 3
Photo of troberge


  • 220 Points 100 badge 2x thumb
BRILLIANT!  (Guinness beer comes to mind)
...the idea regarding record ID was the trigger, to point me in right direction.

However the Form Rule I had to use was slightly different to get it to work the way i needed.  
- Posting here so others can see what worked for me.
When ALL these conditions are TRUE:
- [Record ID# Mirror] is not equal to (blank)        ...hence any record that has already been created and has a value
- AND the user is not in the Role Administrator  ...hence everyone not in our Administrator role

Then do this ACTION:  (decided to put the 3 fields in a section of the form)
- Hide SECTION that has these 3 fields in it
...therefore the 'section' is hidden to all non-admin roles for all "created" records (having a [Record ID# Mirror] value),
while showing this section to everyone in all roles when the [Record ID# Mirror] value is blank (which is only possible when creating NEW records)

Once again Mark...thanks for the insight.
:) thx for letting me know.  Yes, that is a good trick to know if you are in Add mode to trigger a form rule.  Curious that it allows [Record ID# mirror] but not [Record ID#] in a form rule.  One of life's QuickBase mysteries that we just easily work around.