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.

Conditional value list problem

Featured Replies

A business sells clothing that has: different clothing items and different color choices. Some color choices go with some items, others with others, with overlap.

There is a file that stores the color information. Only some of the entire color choices are used at any given time and from season to season the available color choices may change.

E.g. in 2004 for “Blouse” the colors 3, 6, 9, 46 and 77 are available, for “Skirt” 2, 3, 7, 22, 45, 46 … etc. In 2005 “Blouse” has color choices 6, 9, 14, 45, 55, 57. etc…

I have set up a static COLORS file that contains the full set of available colors for any item in a static MERCHANDISE file. This is accomplished via a value list set up in the COLORS file from all of the color code values in the non-empty records; this value list is used as “values from another file” in MERCHANDISE. The user then selects the available colors for the item by checking checkboxes.

E.g.

-list-

235....Blouse.......[]2 [x]3 [x]6 []7 []8 [x]9 …

236 ...Skirt...........[x]2 [x]3 []6 [x]7 []8 []9 …

I chose this method because this way I can avoid having to display dozens of color choices that are not avaialble in a season. Considering the problem I'm facing, this separate COLORS file approach may not work.

There is an INVOICES file that samples the available merchandise, and via scripting creates a dynamic SALES file where the individual records are essentially copies of the merchandise items in the static MERCHANDISE file.

This SALES file is being looked at, via an invoice number based relationship, thru a portal in the INVOICES file.

When the user creates a line in the SALES portal of the INVOICES file, it displays the item’s name (e.g. “Blouse”) and other fixed values, such as price, and a few changeable fields, e.g. number of items, size, and the color choice.

I would like to make it so only the color codes selected in the MERCHANDISE file will show up in the portal lines. When the color choices are changed in the MERCHANDISE file, the available color choices should automatically update themselves for subsequent sales created in the portal.

Thus

-portal-

Code......Name.........Price...Colors –

235 ........Blouse........25.......[3,6,9… in a menu]

236 ........Skirt............35.......[2,3,7… in a menu]

I could not make my value lists to be restricted to "choices/item", it contains the full set of choices, (although sometimes with check marks next to those I would like to see exclusively in the list).

Any ideas, suggestions, examples or conceptual coding snippets would be highly appreciated.

See if the attached helps. Note the sort order of the relationship between Products and SeasonColors.

SeasonColors.fp7.zip

  • Author

:yourock: [color:red]AWSOME! :yourock:

-----------------------------------------

Thanks a million! So simple!

I just returned to FMP after 3 years, reopened some of my old files made in v6 and started to tinker with them. Now I see a lot has changed since then! I'd better buy a good book. Any suggestions for one?

Again, thanks!

Not having read any of them, I'd suggest you turn to the Resources section of this forum.

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.