Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

how to create a value list using field names

Featured Replies

  • 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?

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.

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

  • 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

here's the implementation.

Dj

FieldNames.zip

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.