Skip to main content


Requirement of Many to Many between

Conditions

Depending on Form Selection of Questions

Condition 1 => FALSE-FALSE-FALSE-FALSE
Condition 2 => FALSE-FALSE-FALSE-TRUE
Condition 3 => FALSE-FALSE-TRUE-FALSE
Condition 4 => FALSE-FALSE-TRUE-TRUE
...
...
Condition 15 => TRUE-TRUE-TRUE-FALSE
Condition 16 => TRUE-TRUE-TRUE-TRUE


For each condition there are some Files that need to be displayed in a List View.

However just wondering howto build the many-to-many relationship..

Table of Files
ID,Text,Attachment

Table of Conditions
ID, Condition X [ 1-160

Table of ConditionFiles [ Many to Many ]
ID, FileID, ConditionID

Eventually in the Form if a certain condition is meet, then will filter a list from the ConditionFiles, but just wondering if can filter the Condition ID and display the files that belong to that particular condition ID.

I wonder if somebody has achieved this using SQL Tables ?

 

THX Dino.

Thank you Scott... sure a procedure is a way to get thinks simple in K2.

 

 

However I wanted to acomplish this within K2 and succeed using unbound rules and getting the results I wanted. this issue is SOLVED !!!

 

17056i4C1B086003209B8C.jpg

 

 

Finally with and Unbound rule have the end result... on selection of a Rule show the List that link the Rule with the Files. F Optionally on the View could be hidden ]

 

Later triger a for Each Loop on the same view within the scope of the Files and return only the Files that belong to that particular Rule. 

Using the List Add Method are inserted within a new list and the en result will be a Form where once selected the Rule will retrieve the files that were asociated with that particular rule.

 

Enjoy !!!


Reply