1 Reply Latest reply on Aug 20, 2009 6:45 AM by mmccarty

    reset value of global feild for each record



      reset value of global feild for each record


      Hi Everyone,

                       I have a Global field, which has drop-down value list of all the Subjects, 


      Depending on the value in Global field, the results of the subject will be displayed on the Portal. But the normal behaviour of Global field is it keeps the value for all the records,


      I would like to reset it to say all, so that by default portal displays results for all Subjects and if value changes in global field the portal should display records accordingly.


      I would have done it using checkbox if i have 3 or 4 subjects,


      Also how would i define All in the drop-down list, as it is not custom value list, it gets the list from different table.


      Thank you.


        • 1. Re: reset value of global feild for each record


            Try making the global field a part of the keys between the two tables.  I will assume you have some key or ID for what ever table the global field resides in.  Let's refer to that as ID.  Let the global field be _kg_global.

            Create a calculation field in the same table, _kp_Subject Key = _kp_global & "-"&ID

          Now in the records you are accessing through a portal, set up a similar  text key and link the two tables through these keys.  When you change the global field the key between tables will change and different records will be related. The portal will adjust automatically.


          I hope that makes sense, if not here is an example from my database.  I have 30 tasks each with their own ID (task_ID) and each task has multiple years of funding records.  So I created the global field _kg_Year (ex 09,08,07, etc).  Then the calculated key is _kg_Year&"-"&task_ID (ex 09-229900).  This key links to the Funding table whose key is 09-229900.  I placed a portal on my task page linked to Funding.  When I change from 09 to 08 in the global field the portal now shows me my 08 funding records. 

          I time saver is to "allow creation of records in the Funding Table based on this relationship".  Then when I want to add new funding records, I just fill in the global field with the year and type directly into the portal.  The key in Funding is automatically created.


          Let me know if you have questions