1 2 Previous Next 21 Replies Latest reply on May 27, 2011 8:57 AM by NaturSalus

    Conditional Value List for a Portal

    NaturSalus

      Title

      Conditional Value List for a Portal

      Post

      Hello, 

      I have two tables:

      Process

      Document

      Process table fields:

      __pkProcessID

      ProcessName

      ProcessStepName

      Document table fields:

      __pkDocument ID

      DocumentName

      ...

      What I want to achieve is to have a portal on the Document layout where to put the processes and processes steps where a document is needed.

      For instance, Document 1 could be needed at:

      Process 1 step 1

      Process 1 step 5

      Process 3 step 4

      Process 10 step 2

      Process 10 step 5

      ...

      I surfed the web in search of help and I got an example that describes how to setp up conditional value lists both for fields and for portals.

      No issue on the fields part. However, for the portals you get the same portal field values for all the records what doesn't make any sense.

       Since I couldn't upload the file in the post, the link to that example file is: http://www.digitalfusion.co.nz/weetbicks/conditional-value-lists-pt-2--building-for-use-in-portals/25/

      Any help on what is wrong with this file or any suggestions as to how to setup a conditional value list for a portal is much appreciated.

      Thanks

        • 1. Re: Conditional Value List for a Portal
          aammondd

          You will need an additional field on your Process Table to store the Document ID associated with that particular record

          _fkDocumentID (Foriegn Key) then you establish a relationship between Document and Process based on _pKDocumentID = _fkDocumentID

           

           

          • 2. Re: Conditional Value List for a Portal
            NaturSalus

            Hello aammondd

            Since many different documents can be associated to a particular process step, I would need a portal to show all documents associated to each process step.

            My objective is just the opposite, for each document record I want to list in a portal all the processe steps where it plays a role.

            I also need a conditional value list based on the Process table, so that once I select a process I have only to choose from the process steps of that process.

            Let me elaborate a little more.

            A Process = a task

            Process Step = a step in a task


            In an Organization there are several processes. For example: Purchasing, Trainig, Premises Cleaning, Raw Materials Reception, Raw Materials Storage, etc

            Each process can be divided in several steps.


            The Documents describe who does, what, when and how.


            Some Documents are process specific and are associated to just one Process. 

            Some Documents are general and are used in many different processes in many steps.

            So all sort of combinations are possible in terms of the documents that are associated to a particular process as well as to the different process steps.


            Back to my example, each Document record can be associated to many different processes and also to different steps of any process.

            Don't know if it makes sense.

            Thanks

            • 3. Re: Conditional Value List for a Portal
              philmodjunk

              Until you have relationships that work for your portal, we can't help you set up relationships that work for your conditional value list.

              You still need the field aammondd pointed out and your portal need either this relationship or possibly a join table in order for it to work:

              Documents::__pk_DocumentID = Processes::_fk_DocumentID

              Otherwise you have no way to associate a Process record with a document record.

              The above example is for one to many relationships. (One document can berelated to many processes, but a process is related to only one document.)

              If you have a many to many relationship, (One document can be related to many processes and one process can be related to many documents), you will need a join table to manage the many to many relationship.

              • 4. Re: Conditional Value List for a Portal
                NaturSalus

                Hello Phil,

                If you have a many to many relationship, (One document can be related to many processes and one process can be related to many documents), you will need a join table to manage the many to many relationship

                You are right, I missed this fact Embarassed

                • 5. Re: Conditional Value List for a Portal
                  NaturSalus

                  Okay, ProcessDocument joint table done.

                  ProcessDocument joint table fields:

                  __pkProcessDocumentID

                  _fkProcessID

                  _fkDocumentID

                  Until you have relationships that work for your portal, we can't help you set up relationships that work for your conditional value list.

                  Since I don't understand why in the demo example at http://www.digitalfusion.co.nz/weetbicks/conditional-value-lists-pt-2--building-for-use-in-portals/25/ you get the same values for the the Sport Category, Sport Name, and Sport Equipment fields across all records, could you guide me to an already published and working example of a conditional value list for a portal?

                  Thanks

                  • 6. Re: Conditional Value List for a Portal
                    philmodjunk

                    Conditional value lists work much the same whether or not they are in a portal. The key details are to first get a relationship that works for your conditional value list and then to set up your value list correctly to use this relationship.

                    I'm not clear from what you have posted so far as to how your layout and relationships should be set up for what you want to do with the conditional value list.

                    Normally, a many to many relationship is implemented with a portal to the join table, and with fields from the third table added to provide additional detail.

                    Thus, a portal to the Join table will list Processes when placed on the Documents layout and will list Documents when placed on a Processes layout. I can't quite picture where a conditional value list has a role in either of those layouts.

                    • 7. Re: Conditional Value List for a Portal
                      NaturSalus

                      Hello Phil,

                      a portal to the Join table will list Processes when placed on the Documents layout

                      This is exactly what I want.

                      In the document Layout I have a Portal to the ProcessDocument joint table

                      The Portal have two fields:

                      ProcessDocument::ProcessName

                      Process::ProcessStepName

                      What I would like to be able is to use a value list from which to choose a value for the ProcessName and, based on it (conditional), use another value list that would show ONLY the StepProcessNames for the chosen Process Name.

                      For example;

                      In the Process table I have the following records:

                      ProcessNumber:1

                      ProcessName: Document Control

                      ProcessStepNumber:1

                      ProcessStepName: Document Identification

                      ProcessNumber:1

                      ProcessName: Document Control

                      ProcessStepNumber:2

                      ProcessStepName: Document Recording

                      ProcessNumber:1

                      ProcessName: Document Control

                      ProcessStepNumber:3

                      ProcessStepName: Document Archiving

                      ....

                      ProcessNumber:2

                      ProcessName: People Enrollment

                      ProcessStepNumber:1

                      ProcessStepName: People Interviewing

                      ProcessNumber:2

                      ProcessName: People Enrollment

                      ProcessStepNumber:2

                      ProcessStepName: People Selection

                      ProcessNumber:2

                      ProcessName: People Enrollment

                      ProcessStepNumber:3

                      ProcessStepName: People Hiring

                      .....

                      In the Document table I have the following records:

                      Document number: 1

                      Document Name: Document Control

                      Portal to ProcessDocument

                      ProcessName                       ProcessStepName

                      Document Control                 Document Identification

                      Document Control                 Document Recording

                      Document Control                 Document archiving

                      People Enrollment                 People Interviewing 

                      Document number: 2

                      Document Name: Human Resources Management

                      Portal to ProcessDocument

                      ProcessName                       ProcessStepName

                      People Enrollment                 People Interviewing 

                      People Enrollment                 People Selection

                      People Enrollment                 People Hiring

                      Okay that is the outcome or the what.

                      Now the how,

                      When in the portal to the ProcessDocument joint table

                      I move to the ProcessName field and choose from the list of all the available Processes listed in the Process table.

                      Then I move to the ProcessStepName and based on the ProcessName chosen before  and choose from the list of only (CONDITIONAL) the ProcessSteps for that particular Process.

                      So I would like to know how to setup a conditional value list for a portal.

                      The upper part of the example that I got surfing shows how to do it for three individual fields. I know how to do it and have done it in my project.

                      The lower part of the example that I got surfing shows how to do it for three fields on a portal. But it doesn't work because once you make your selection for a record you get the same values for all the records. Why? I don't know.

                      This is the reason why I am asking you for guidance.

                      Just one example of a conditional value list for the fields of a portal, able to have different values for different records, will sort out my problem.

                      Is this of any help?

                      • 8. Re: Conditional Value List for a Portal
                        philmodjunk

                        Seems like you are linking to Process Step records rather than Process records.

                        Each record on the process side identifies a process step and multiple records that belong to the same process, but with different steps can exist on this side of the many to many relationship.

                        Does that make sense?

                        Please confirm that and then I'll try to get back here with a description of how to set up a conditional valuel list of process steps for a selected process.

                        • 9. Re: Conditional Value List for a Portal
                          NaturSalus

                          Seems like you are linking to Process Step records rather than Process records.

                          You are right, in the end I am dealing with Process Steps records.

                          Each record on the process side identifies a process step and multiple records that belong to the same process but with different steps

                          Yes, each record is a Process + ProcessStep

                          Yes, the same Process has different steps.

                          but with different steps can exist on this side of the many to many relationship

                          Not quite sure I get it. Maye it is on the many side of the many to one (Process table >-- ProcessDocument joint table) side of the relationship

                          As you pointed out I have: Process--<ProcessDocument>---Document

                          Does that make sense?

                          I would say yes

                           I'll try to get back here with a description of how to set up a conditional valuel list of process steps for a selected process.

                          Yes that describes perfectly what I am trying to achieve.

                          Many thanks

                          • 10. Re: Conditional Value List for a Portal
                            philmodjunk

                            Seems like you have  this set up:

                            Processes---<ProcessSteps----<Process_Document>----Documents

                            Processes::__pk_ProcessID = ProcessSteps::_fk_ProcessID
                            ProcessSteps::__pk_ProcessStepID = Process_Document::_fk_ProcessStepID
                            Document::__pk_DocumentID = Process_Document::_fk_DocumentID

                            The key detail is that one record in Process_Document links one Document to One Process step--not to one process.

                            For your conditional value list, you'll need an extra table occurrence of ProcessSteps So that you have this:

                            ProcessStepsSameProcess::_fk_ProcessID = ProcessSteps::_fk_ProcessID

                            Then your conditional value list can list values from ProcessStepsSameProcess, starting from ProcessSteps.

                            • 11. Re: Conditional Value List for a Portal
                              NaturSalus

                              Hello Phil,

                              Thanks for the directions.

                              Seems like I am a little thick and I am not getting it. I have problems with the portal and value lists setups.

                              To facilitate you the task I have uploaded a nonworking model as per your directions. Link here: http://www.filefactory.com/file/cb75324/n/ConditionalValueListModel.fp7

                              In the FM forums people have used different approcahes for the conditional value list setup, what makes it hard to elicit a "common pattern".

                              So if you could have a look at my file and let me know what is wrong concerning the portal and the ProcessStep value list, I would appreciate it.

                              Quite irrelevant, but I didn't manage to transmit you the actual structure of my project which was:

                              Processes---<Process_Document>----Documents

                              and not

                              Processes---<ProcessSteps----<Process_Document>----Documents

                              Process table fields:

                              __pkProcessID

                              ProcessName

                              ProcessStepName

                              Initially I used this setup because this is the one used by FM on its Conditional Value List support example.

                              Never mind, your proposal is good to me and the attached file is based on it.

                              Quite astonishing the huge amount of time invested in carrying out a simple task.

                              Thanks again

                              • 12. Re: Conditional Value List for a Portal
                                philmodjunk

                                Needed a few changes before it would work:

                                ProcessStep 2::_kf_ProcessID = ProcessStepDocument::_kf_ProcessID   (had to add a new field for this).

                                First field in portal needs to be ProcessStepDocument::_kf_ProcessID so that you can select the process.

                                2nd field should be ProcessStepDocument::_kfProcessSteptID for your conditional value list.

                                The conditional value list needed to be changed to list values from ProcessStep 2 in both columns (the second column listed values from ProcessStep.) And need to show ProcessStepDocument as the "starting from" table occurrence.

                                • 13. Re: Conditional Value List for a Portal
                                  NaturSalus

                                  Hey Phil,

                                  Certainly not working

                                  I give up!

                                  Thanks

                                  • 14. Re: Conditional Value List for a Portal
                                    philmodjunk

                                    Here is a copy of the file with the changes that I made:  http://www.4shared.com/file/VG6DBFXT/ConditionalValueListModel.html

                                    If that doesn't work, let me know exactly how it doesn't work for you and we'll take another shot at it.

                                    1 2 Previous Next