3 Replies Latest reply on Dec 8, 2013 8:27 AM by philmodjunk

    Update portal ID Field based on portal record not layout record

    Phil_1

      Title

      Update portal ID Field based on portal record not layout record

      Post

           I have two tables:  Entities & Ownership.  They are related by Entities::EntitiyID.  On a layout based on the Entities table I have a portal that links to the Ownership table.  In that portal I set up a drop down list to select an Entity name to populate the Ownership::Entity field.  This works fine but I also want to store the Entities::EntityID based on the selected portal record in the Ownership::OwnerID field in case the name field changes.  Currently this field is populated by the Entity::EntityID of the selected record from the Entity table the layout is based on.  How do I update it with the selected portal record from ownership?

           I looked at PhilModJunk's example SimpleNameLookupDemo.fmp12 but could not figure out how to make it apply to this scenario.

           Thanks in advance

           P

        • 1. Re: Update portal ID Field based on portal record not layout record
          philmodjunk

               I'm not sure that I understand correctly what you are describing. Do you want to store the Entity Name in addition to the Entity ID in Ownership?

               Since you can simply use the relationship to access the entity name in Entities for any given record in Ownership, why do you need to do this? What problem does that solve for you?

          • 2. Re: Update portal ID Field based on portal record not layout record
            Phil_1

                 The first question's answer is; the intention was yes but I understand it is not necessary.  

                 The reasoning is that I would like the drop down list to maintain the Entity Name after selection.  When I specify fields for the value list it pulls up the second value which is the name but it reverts to showing the Entity ID upon selection.

            • 3. Re: Update portal ID Field based on portal record not layout record
              philmodjunk

                   Which is a minor reason behind the simple name look up demo. It could be used in this situation.

                   But the wrinkle that has to be dealt with is that the text field does not automatically update if the name in the related table is changed. In the demo file, a script trigger, OnRecordLoad updates the text in the field from the related table automatically as you move from record to record. In other cases, an OnObjectSave trigger on the field in the related table could perform a script that finds all related records and updates the text field to keep them in synch.