?
Solved

Filemaker - Portal table - Allow add, delete but not to edit

Posted on 2013-11-12
5
Medium Priority
?
1,410 Views
Last Modified: 2013-11-21
We havea  portal that shows a number of rows, and an empty row at the bottom that allows a new entry.

We also have a button setup to delete entries.

This is all fine; however once they add an entry, they are not allowed to edit it.

We have an issue in that a drop down appears for new entries (correctly) to pick from a value list.
Then once added, you can still pick this field and change it (incorrect).

The table has a linked subtable holds sub information that is only relevant to that entry (hence why we do not want this changed)

How can we solve this data entry issue?
0
Comment
Question by:webforcesuk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 25

Expert Comment

by:Will Loving
ID: 39641670
There are a couple of ways to handled this. Given your current structure, you could make the entry field a button that runs a simple script. The script would be an If statement which simply tests whether the field has a value in it. If not, you can use a Go To Field or Commit Records step to take the focus away from the field. You can include a Beep or dialog if you wish saying it's not editable.

If [ not is empty( SomeTable::SomeField ) ]
    Go to Field [ Some other field ]
    Beep
End If

Something else to consider though is scripting the entire new portal entry process. This allows you to simply turn off browse access to the field entirely and to have greater control over the process of adding new entries. It also have the beneficial design effects of 1) no longer needing users to scroll to the end of the portal list to create a new record, and 2) keeping users from accidentally creating new records they don't and then forgetting to delete them (a common problem when allowing users to create new records via portal entry)
0
 

Author Comment

by:webforcesuk
ID: 39641980
OK, thanks.

For a few extra points, how would you go about doign this "add" via a button that sits ourside the portal within the parent tables layout?
0
 

Author Comment

by:webforcesuk
ID: 39641995
PS: The first otpion works but not quite.  It certainly stops any input on fields already having a value in the field.  However my value list drop down no longer works for the new field entry.  Just remains blank.  Any thoughts?
0
 
LVL 25

Accepted Solution

by:
Will Loving earned 2000 total points
ID: 39642218
The script should probably be:

If [ not is empty( SomeTable::SomeField ) ]
    Go to Field [ Some other field ]
Else
    Go to Field [ SomeTable::SomeField ]
End If

I've attached a file that shows two portals. One setup the way you are currently doing things and one with a "New Record" button instead to create the new portal record. Note that the portal is sorted in such a way to ensure that the new record pops to the top. There are lots of other ways to do this and various coding efficiencies that can be incorporated, but this is the simple way: save the parent ID, go to a layout based on the related table, create a new record, Set the parent ID, go back to the original layout.

I've also incorporated two script triggers.

(On a separate note: while you can list any range of points for answering a question, in practice, virtually all questions are listed at 500 points.)
Add-New-Record-Basic.fp7
0
 

Author Comment

by:webforcesuk
ID: 39644886
Hi Will,

I will need a couple of days to look at this, but at present, I would suggest it exactly what I needed.

Once checked, Ill close the case and get you your points.

Thanks so far.

Martin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question