Sorry... I have filemaker pro 10 and Filemaker Server Advanced... which is how I am using Instant Web Publishing.
"I would prefer if this was a calculated field,..."
Here's how you should have this set up:
FullName Type: calculation returns type text
Expression: LastName & ", " & FirstName /*Assuming you want lastname, firstname format */
Note that FullName is NOT a text field with an auto-entered, calculated result in this example.
This should work for you in both client and web publishing environments.
Thank you... I have tried do do this. I created a calculated field doing basically exactly what you said. firstname & lastname
The problem is that when I do this, the value lists that I have that include that field no longer show all records. When I do this they show only 4 of the 81 or so records that I have in the table.
It will work. Since it doesn't, we have to determine why it doesn't work.
When you scroll through a list of all your records, does the fullname field show the correct value for every record? If not, then something is wrong with your field definition--perhaps it's a text field with an auto-entered calculation instead of a field of type "calculation".
Exactly how did you define your value list? (List the steps, settings you specified) perhaps there's an issue there.
Try creating a brand new calculation field with a brand new value list to specify values from it. Perhaps there's some file or layout corruption affecting your results.
This field began as a field that would be manually entered. I also had this set to full indexing. This field was used in a relationship as well when I first set up the table.
Since the database has grown, I have included an auto field (ID NUMBER) to be the primary key for relationships. The firstnamlastname field is now used in some drop down lists along with the new ID Number field. Now I have changed the firstnamelastname field to a calculated field, in which case the drop down lists no longer display the full list of records. If I change the Value List for this drop down box to include the lastname field (which is manual entry) or if I change the firstnamelastname field to a text field and require it be entered manually this drop down list works. It is very strange to me that only 4 records show up in the drop down list when I change this field back to a calculated field. All records appear correct when I look at the values in the table, and their does not appear to be anything unique about the 4 that actually do show up.
I would leave it as a text field and require manual entry, however if I do that, that is when the value of the field is reverted to an empty field when they submit. (only from instant web publisher)
I do not know if this has anything to do with the problem, but here is something that I was thinking about.
At first this field was manual entry, so the values were manually stored in the database.... When I switched to a calculated field the values would have changed from what was manually entered and changed to the new calculation. This manual data must however still be present, because when I switch back to manual... the field is not empty... it still contains the correct value.
I just tried creating a copy of this field with the same calculationand unfortunately I continue to get the same 4 records from the drop down list. Could it be something with the two fields that I am deriving the calculation from? firstname & lastname?
As I have been suggesting, you are NOT using a calculation field. You appear to be using a text field with an auto-entered calculation. This behaves differently and will fail to update when changes are made unless you select the appropriate options.
Do these steps exactly:
Select Manage | Database | Fields
Enter a new field name, select Calculation as it's field type in the type menu (bottom right corner) and click create. A specify calculation dialog appears:
Enter: LastName & ", " & FirstName
as your expression (Substitute your field names in place of LastName and FirstName) and click OK.
Place this field on your layouts. Use it as the source for your value list and see if it works.
To change this field to a calculated field... I click the "Type" drop down box and choose calculated field. Then I enter the calcuation... firstname & lastname.
I am not leaving the type as text and clicking option and selecting calculated value from the auto enter tab.
I believe this is what you are referring to.
Then this should work for you. Every record should display the combined contents of these two fields in this calculation field. If it isn't then something isn't set up correctly or the file has become corrupted.
Perhaps the file, field or its indexes are corrupted. Recover the file and see if the recovered file populates the value list correctly or create a brand new file with just the two text fields and one calculation field and test it's results.
I just spotted another factor here:
"I just tried creating a copy of this field with the same calculationand unfortunately I continue to get the same 4 records from the drop down list. Could it be something with the two fields that I am deriving the calculation from? firstname & lastname?"
In a two column value list of this type with the first column hidden, only unique instances of your full name field will be visible.
In other words if you have
ID Full Name
1 John Smith
2 John Smith
3 George Jones
4 Fred Jones
You would see
John Smith (1 will be entered in the field)
George Jones (3 will be entered)
Fred Jones (4 is entered)
The second instance of John Smith will not appear.
I just ran recover on a backup of the file. No errors found. Also, the names that are missing are not duplicates. There are 82 unique names in the database, but only 4 show up in the drop down list.
I know this is a strange situation I am facing... and all this is not to mention the fact that when I change this field to manual entry the users cannot modify it while using Instant Web Publishing. (Only Instant Web Publishing and only this field - so it is not a permissions problem) I am beginning to think I have found a bug in the filemaker pro system.
If he based the value list on the field "ID" would the list not then include all entries including duplicates?
Also, the notion of the field firstnamelastname being filled in by the user makes no sense, and of course is impossible if the field is a calculation field. Even as an auto-enter text field with concatenating this makes no sense. As I believe you've said, user should enter 1st name and last name and let the program concatenate.
I don't know what else to suggest short of physically examining a copy of your file. A calculation field is a standard feature that's been used in FMP files since the beginning and it's quite solid and doesn't behave the way you describe.
If you read the entire thread carefully, you'll find that DSM has at different times defined this field both as a text field (where users could then enter text directly into the field) and also as a calculation field where of course the user cannot then edit the field directly.
In reference to my saying that duplicate names won't show in the value list, that's true IF the first column of ID numbers is hidden. If you don't hide the first column, then duplicate names would be visible.
If you'd like me to look at the file, click my forum name and send me a private message. I'll respond back with an email address. Or, you can post a copy of the file to a filesharing site and post the link to it here in this thread.