Jump to content

Restricting data entry in Selected records


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

Recommended Posts

I have a layout in List view where each line represents a LOCATION.  Picture the location being a numerical sequence of slots in a number of drawers. 

The Locations are related in a 1-to-1 relationship with ITEMS. Each Item occupies a single location. Over on the ITEMS layout, the user can create a new item and assign it to the next slot in the LOCATIONS sequence. All good.

Occasionally an ITEM is discarded, and its record is deleted from the database. This results in an empty slot in the midst of the Locations sequence. The Location record is still there, because we don't delete that record - the slots, once created, are there for good.  

I need to find the simplest means of allowing the user to enter a new Item and assign it to one of the empty slots in the sequence if he or she so desires. (Sometimes you need to enter 3 new items and you want them to be in consecutive Locations, so you wouldn't opt to fill gaps with them).

One way is I can put a little button on the Items called "Fill Gaps" and pop up a little window with a filtered portal showing the available gap Locations. Work, but seems a little busy.

Another way I'm thinking is that back in the List view, where you can easily see the empty Locations (there's nothing in the Item Title field), I could make the Title field a 1-row portal allowing record creation. Entering the name of a new Item there would create the new Item record and you go over to the Item  layout to finish entering descriptive data about it.   The problem with this is I don't like the idea that the user can change or erase the Titles of existing Items from this layout -- people may get confused and not realize they're making a chance to the Item record itself.

So, is there a way I can disallow data entry in the List View lines that are already connected to an item, while allowing it in those that aren't (the difference is that the foreign Key Field would be empty).

Or . . . is there just some better way of managing this that I'm not considering?

Thanks for any suggestions!

 

 

Link to comment
Share on other sites

Lots of ways of approaching this. Why not have a button in the list view of locations that only shows when the Foreign key is empty. Use the 'Hide Object When' feature in the inspector. The button would be labelled 'Add Item'.

When you click that button it opens a card window based on the items layout, creates a new record with the correct key to relate to the location, and allows the user to fill in the description. When they close that window, ensure that the keys are correct in both tables.

Since the Foreign key in the location will now be populated, the button will disappear.

You can therefore make the name of the item non-editable for all rows in the list view of locations.

 

Does that make sense?

Edited by rwoods
  • Like 1
Link to comment
Share on other sites

Hi rwoods,

If the OP is still using v15, then the Card Feature isn't an option because it was introduced in v16.

@Wickerman

If you have upgraded your FileMaker, please update your profile.

Lee

Link to comment
Share on other sites

Thanks Mr. Woods, for the productive suggestion -- I had mulled doing some sort of similar thing, but hadn't quite got there.  Your suggestion will suffice as motivation enough for me to upgrade to FMP 16 -- and I''ll update my profile when I do so, Lee!

This place is awesome.

Link to comment
Share on other sites

Sorry, hadn't noticed the FileMaker 15 entry in your profile.

My suggestion could still be used in FM15, just use a new traditional window instead of a card. Not as pretty, but would still work. You might want to disable the close box on the new window and force the user to do what you want them to do before clicking 'OK' or 'Cancel' buttons that you would provide.

Link to comment
Share on other sites

  • 1 month later...

Thans to all responders -- I installed the update and the Card window approach worked great-- I really appreciate the guidance!

Edited by Wickerman
Link to comment
Share on other sites

This topic is 1511 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
 Share

×
×
  • Create New...

Important Information

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