December 5, 200223 yr Newbies Is there a way to create a value list of either all field names in the database or all fieldnames on a certain layout? I have tried using the FieldNames function [i defined a calculated field as FieldNames( "BargSurveys" , "" ) where BargSurveys is the name of my database], but this gives me no result. And even if that worked, I would still just get a list of all the field names in that field, but it wouldn't allow me to create a value list. any ideas?
December 6, 200223 yr Probably because the FieldNames() function is unstored. If it's the field names you want, why not juat make a custom value list and type them in by hand? After all, the field name won't change very often.
December 6, 200223 yr Create an file Fields.fp5 for this purpouse with following structure: FileId FileName LayoutId LayoutName FieldsNamesCalc multikey so you'll have one record for every layout for every file you need to document (or whatever else you are trying to achieve) Now field FieldsNamesCalcs should be calculated as following: Case(FileName&LayoutNames,FeldNames(FileName,LayoutNames), FeldNames(FileName,LayoutNames)) result text calculation indexed whilst the multikey should be FileID & " " & LayoutID Now in file where you need those values define fields: gFile, gLayout, multikey=gFile & " " & gLayout also define two relationships: FileRel::gFile-->FileID LayoutRel::multikey-->multikey Fianly define value lists you'll need: list "Files" as use values from field FileID also display value from field FileName from file Fields.fp5 list "Layouts" as use only related values from relationship "FileRel" from field LayoutID display also values from field LayoutName List "Fields" as use only related values from relationship "LayoutRel" from field FieldNamesCalc HTH Dj
December 6, 200223 yr Author Newbies Hi. Thanks for your post. I think I got most of it, but the one part that doesn't make sense to me is how to define the calculation for the field FieldNamesCalc in Fields.fp5. In your post you said to calculate it as follows: Case(FileName&LayoutNames,FeldNames(FileName,LayoutNames), FeldNames(FileName,LayoutNames)) And I am just not sure if you meant to define it verbatim [ie, when you write 'FileName&LayoutNames', you are referring to the field called FileName and then an "&" and then the field called LayoutName], or whether you mean for me to substitute in some actual names of files and layouts that I am using. I am confused. Could you give me an example of the correct calculation for FieldNamesCalc if I am trying to create a value list for fields which appear on a layout called "BargSurveyEntry" in a file called "BargSurveys"? Thanks for your help
Create an account or sign in to comment