?
Solved

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

Posted on 2013-11-12
5
Medium Priority
?
1,368 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

762 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