lock / disable field in a form

2,527 views
Skip to first unread message

Roadie222

unread,
Oct 4, 2014, 8:45:53 PM10/4/14
to sailfor...@googlegroups.com
Hi Chris

I have a form were I populate fields by using a key value and search a remote table.

I don't want the user to be able to modify any of data shown, only input data in other fields. I have marked the populated fields, disable after save, but obviously since form has not been saved, user can mess up data.

How can I have these fields locked?

Thanks

Doug Packer

unread,
Oct 5, 2014, 12:08:01 AM10/5/14
to sailfor...@googlegroups.com
Hi Roadie222,

Is the attached close to your plan of action?

I pick a record from the remote table, that action triggers a custom menu that puts the data into the local form/field and issues a save command to lock it.

Doug
Testing_Demo2.sfg

Roadie222

unread,
Oct 6, 2014, 6:58:04 PM10/6/14
to sailfor...@googlegroups.com
Doug thanks for the idea. I see what you are doing with the remote table.
This is a truck service system
In my case the search to the remote table is initiated with a search list get required connection, using the serial number of the truck. Potentially this table will be around 500+ records.

This will populate description fields to let the operator know he is working on the right truck. At this point I need to have the populated fields locked. However more required info needs to be typed before they can open a pivot table were one or more records must be created before saving.

Do you have any idea on his to protect this initial data from being modified by the user?

Thanks

Roadie222

unread,
Oct 6, 2014, 6:58:05 PM10/6/14
to sailfor...@googlegroups.com

Doug Packer

unread,
Oct 6, 2014, 9:52:17 PM10/6/14
to sailfor...@googlegroups.com
Potential options:

1. Find any way to wedge a custom menu into your work flow to save/protect data. This was my first attempt.

2. Break records down as far as keys and single data fields. Again you need to save data to protect it. Change your simple data model into a series of 1-to-1 relationships.

3. Probably a combo of these 2 based on your needs/factors not yet discussed.

Doug Packer

unread,
Oct 7, 2014, 12:53:58 AM10/7/14
to sailfor...@googlegroups.com
I reread option 2 and feel it is too brief to suit me. I'm assuming you have more than one data field to enter and protect. If this is true, consider breaking this into several tables linked together with a key field and with as little as one data field per linked table.

I have not built anything this extreme but this model adds a lot of saves as the data is entered.


To me, the save and write once tools are your friends.

Jan-Erik Matz

unread,
Oct 7, 2014, 2:11:04 AM10/7/14
to sailfor...@googlegroups.com
Hi!
I use methods of save as a pdf after save.and the pdf is the save file.
PDF file is locked in a commercial program in a pc and that was OK for security. Still have all in phone for search and check. Just to request right pdf file from pc for check.
I hope it will be possible to save file attributes and properties with data and not like now only data.
My method required lot of extra fields in mainform but it results in only one pdf page.
Happy coding from Jemen.

Roadie222

unread,
Oct 9, 2014, 7:39:05 AM10/9/14
to sailfor...@googlegroups.com
It be great if we could lock a field, on a field basis, to be read only, similar to what can be done in excel.

MikeG

unread,
Oct 9, 2014, 11:50:45 AM10/9/14
to sailfor...@googlegroups.com
Not sure if this will help you, but there are two ways of populating a field with a value from a remote table.

Firstly, you can define the field as an entry field and connect it to the remote field (Get Value from). This reads the value from the remote field but then allows change (at least until the value is saved). Based on your original problem description this seems to be what you are doing.

Alternatively you can define the field as a remote field. This displays the value but does not allow change (not via this form, that is).

Mike

Jan-Erik Matz

unread,
Oct 13, 2014, 2:19:19 PM10/13/14
to sailfor...@googlegroups.com
Hi!
A little tip is to use timestamp as a unique field. I have done two identical forms A and B. From A copy to form B.
In form B l have add timestamp to a whole number field. Field is unique and disabled after save. Whole number will show seconds.
All is copied from form A via a button with a custom menu. Fields in form A is cleared and all info is secure in form B.
Maybe it will work for security team
Not so much trouble as send a pdf to pc and make it secure with a expensive PDF program.
Happy coding from Jemen
Reply all
Reply to author
Forward
0 new messages