Any suggestions on HowTo have a List Dropdown pulling the difference between 2 Views ?

  • 9 September 2016
  • 2 replies
  • 0 views

Badge +10

Ihave a Table with an entry for Team 1

Also another table members with 45 Members

For the 4 weeks of the month lets called Sep  Week 1

 

Lets imagine Team 1 only select 20 members to participate.

 

however for week 2 it might choose 25 members....

 

how can setup in an Editable List a Dropdown that only reflect the difference between the original 45 members minus the 20 already used...

This way the dropdown will show only 25 possible options to add the 5 required. 

 

The idea is to prevent duplicated entries in the editable list.... 

 

Any suggestion will be appreciate it.

 

Dino.


2 replies

Badge +9

HI,

In the editable list item table, have  another checkbox field for each member row as statusFlag. The save the status of the checkboxfield statusFlag (Checked is saved as true and unchecked as false) into the datasource table for the editable list iem . When you load the view next time, under the initialize rule, popluate the listitem based on rule that filter statusFlag as unchecked (false), that will display all those members which has not been selcted earlier. It's all about some kind of flag handling.

 

Badge +10

 

Thank you I follow a slight different approach...

 

Usage of Unbound Rules to run nested loop within the List.

 

Create 2 Params for counter and Emp Name

Create a Button to execute the Check Duplicates OnClick.

 

Once Button Clicked.

initialize the counter to 0

Run trough all the Emp Names of the List

Take the current (first name) and the call another nested loop...

If emp name found increase the counter +1 using a Expression.

 

At the end of the second Loop check if counter > 1

That means the Emp name was found more than Once.

Popup Aler and Stop Rule Execution.

 

Seems to be working fine...

 

Need to imlement another previous look to check for required fields within the List.

Like the idea to populate the dropdown only for the remainin items available within the Form.

 

 

 

15613iC2998650B34A5550.jpg

 

So far this the validation is working great and every single time....

Will migrate the call of the Rule Execution for the Create/Update  Method.

 

Thank you K2 Community for share Ideas and Feedback.

 

=)

 

Reply