3 Replies Latest reply on Feb 9, 2015 3:14 AM by Benjamin Fehr

    Question about dynamic value list ...

      Hi,

       

      I am so desperate and I may have asked this earlier - but I d o  n o t et it working... I want to build a list of values to chose from so that an ID will be saved to the field while a "sounding" description is show. Unfortunately the setting is a bit complicated. I have:

       

      • Table "HT Values" - this one stores centrally options for different value lists: There is also a field "Format" that carries the "sounding" descriptions and an ID carries the ID to be stored
      • Table "Products" - in here is a field "ID Format" that saves the ID of a chosen "Format". Here I want to have (my problematic) value list (IDs to be stored, text of "Format" to be shown)

       

      In my case not all records from "HT Values" that carry text in the "Format" field are allowed, but only some that are defined in a table "Prices". This list containes ID, ID Pricelist, ID Format, Price.

       

      The table "Products" is linked to a table "Categories" (via ID Category) in which for a Category-recordset an ID Pricelist is present.

       

      If possible I do not want do scatter my TO-Graph with too many TO-relations but think there should be a more elegant way. I can easily get a list of IDs for Formats from "HT Values" that are "allowed" in the context via eSQL and store it in a global field.

       

      But: how can I make the value list with "ID" and "Format" (text) - the first to be saved after selection, the secon to be shown...

       

      Hopefully someone can follow my explanation and give some advice how to start solving the issue.

       

      Thanks,

      Luna.

        • 1. Re: Question about dynamic value list ...
          erolst

          Luna.media wrote:

          Hopefully someone can follow my explanation

          Not really; I first thought that it is about a conditional value list, but since (at long last…) you state that …

          Luna.media wrote:

          I can easily get a list of IDs for Formats from "HT Values" that are "allowed" in the context via eSQL and store it in a global field.

          … that doesn't seem to be the problem; so does your actual question boil down to


          “How can I resolve a foreign key to display a value from the table where that key is the primary key without actually using a relationship, since I feel that adding an additional TO for that purpose would clutter my RG?”


          ?

          • 2. Re: Question about dynamic value list ...
            electon

            I think what you're looking for is showing a related text value while the field holds the id.

            I this case set the field to pop-up menu instead of drop-down list. The value list should be: first field ( id ), second field ( text ) and set to "display values only from the second field".

            Unfortunately, you have to click the menu to unfold, unlike a drop-down but I haven't found a workaround for this.

            Actually can't be bothered. It works.

            • 3. Re: Question about dynamic value list ...
              Benjamin Fehr

              a popover (new with FMP13) with a portal containing the criteria's to choose.

              Have a Button with script in the portal to have ID from chosen portal inserted into Product::ID, followed by "close Popover"