Jump to content

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

Recommended Posts

Posted

I'd like to have field contents locked, after they are created, but still be able to add a new record and enter new information into this same field. Is this possible?

Posted

HI bubette,

I don't know if there is a setting that can acomplish what you want but if your navigation is scripted then you could go to a different layout for new records than you go to for existing records. The layout for existing records would have the field attributes changed to non-modifiable whereas the new record layout would allow changes to these fields

HTH

Phil

Posted (edited)

Hi Inky

Thanks for replying. I'm just not sure about adding a new layout just for new records. Sounds a bit confusing. Does anyone else know if there is a field option that will permit what I'm trying to accomplish?

Thank you to everyone for your help.

Edited by Guest
Posted

If you use a scripted solution to submit a record, you could have a field set with a value in the submit script which could then be used in the privilege set to qualify edit status.

Posted

Hi Walter,

Thanks for replying. I wish I were a more experienced user so that I could take advantage of your information. What sort of scripted solution would I use to submit a record?

Posted

There is a "trick" which I have used but I'm not sure how stable it is in general and I only mention it as a stop-gap until you sort out the proper way to do it. It requires the use of an auto-enter serial ID-number, serialID, and a global "mirror" field, field2. The first setting is that you set the serial number to auto-enter on committment. The field that you want to protect, field1 say, is set with an

auto-enter calculation replace existing value

If(Get(ActiveFieldName) = "field2" and IsEmpty(serialID);field2;field1)

you must also check

Prohibit modification of value during data entry.

On the layout put field2 alongside field1. During data entry for a new record you can enter data into field2 and when you commit the record it will be transferred into field1. At no time is field1 modifiable by the user but during the period between creation and committal you can enter data into field1 via the global field2.

I have to say that my preference in this situation is to use a special layout for new data entry and if you do not like the idea of a new design simply make a copy of the one you normally use then script the NEW RECORD button to smitch layouts and the SAVE RECORD button to switch back.

Posted (edited)

I'm at work so I need to be quick with this post. Many Apologies...

If you can live with the field being out of the tab order, set the field as a button which does a simple:

Set User Abort (off)

IF[isEmpty(protectedField)]

GoToField[protectedField]

ELSE

Go To Next Field

Exit Script

END IF

The protectedField MUST be out of the tab order for this to work because it requires that a user click on the field to modify it's contents.

OR: You could create a validation field, this one could even be a repeating field to validate any and all of your validated fields. Remember, it MUST be created LAST after all of the validated fields are created. This is due to the fact that FM will evaluate circular references in order of field creation.

You set validationField to:

Auto-enter calculation, Do Not Replace, Prevent Modification.

Auto Enter calc =

Choose(Get(CalculationRepetitionNumber)-1;

Extend(protectedField1);

Extend(protectedField2);

Extend(protectedField3) )

You set each protectedField to validate only on data entry with the following:

Case(not IsEmpty(validationField[1] AND protectedField1 = validationField[1]; TRUE ; FALSE )

The only problem with this is that it will make a racket of warning boxes every time a user tries to change a protected field.

EDIT:

I just thought of a third and almost bulletproof way. It would simply replace any modified contents with the original value entered. Period. You could then set up a script to correct an erroneous value and attach it to a button. The script would check to see if the person is allowed to change the value and then it would simply clear both the protectedField and the validationField for entry of new data.

validationField = Auto Enter, Can't Modify Auto, Do Not Replace

Choose( Get(CalculationRepetitionNumber) - 1 ;

Extend(protectedField1) ;

Extend(protectedField2) ;

Extend(protectedField3) )

Then you set each protectedField to auto enter the contents or it's related validationField repetition EXCEPT if the validationField repetition is empty.

protectedField1 = Auto Enter Data Replaces Existing

Case( not IsEmpty(Validationfield[1]) ;validationField[1] ;protectedField)

Edited by Guest

This topic is 7050 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.