Add a picker to a Check box list

  • 11 November 2016
  • 3 replies
  • 1 view

Badge +1

Hi,

 

I have three sql tables, software, employees and AccesToSoftware. I need to do a view wich allow manager to give software access to the members of his team. I've got three SMO, one for employees (ID, name), one for software (ID, name) and one composite for access (ID, ID employee, ID Software, referal profil). When the manager give access to a software he has to specify the referant profil (a user that has already access to). I want to create a checkboxlist contains all our software, and when the manager checked an item a picker appear next to the selected check box to select the referant profil. A validate button insert the information in SQL table AccessToSoftaware.I don't think it's possible but if you have any ideas it would be great.

 

Thanks 


3 replies

Badge +7

I think the answer to this might be easy I hope I am understanding this correctly

On your form you have a Softwarecheckbox list tied to Software so the form shows a list. This is one control that has multiple values that the system sees as a delimited list.

You would also have a corresponding picker control next to each check box (you might have some issues lining this up), call each one softwarenamereferentpicker profile. This picker control would be tied to the AccesToSoftware smartobject and filtered by the Software selected (since you have a one to one you can hard code this)

You would create a rule on change of the Softwarecheckbox and you would create an If rule for each type of software. The type of If would be an advanced rule that says Contains software. You must use contains because it is a delimited list with multiple values. Each one of the rules needs an else that hides the picker as well.

If advanced condition (softwareCheckbox contains Sharepoint)

Show sharepointreferencepicker

Else

Hide sharepointreferencepicker

The only downside to this approach is you have to change the form to add new software but not to remove or filter software.

 

I hope this helps.

 

 

Badge +1

Hi,

 

Thanks for your answer. I thought this solution but in the future I want to do Admin views and let the support IT manage the list without have to change the form. I can't find a solution to do it simply.

 

Best regards

 

Badge +7

This is just a quick thought but you could probably do this with a list view. One Collumn would be user from employees, the second column would be from the software smart object and the 3rd would be the referent profile. In this way they can add a row for each one they need to grant access to and not just check a box. The when they submit you persist each record to the composite table.

You could also just out the employ in an item view at the top. In this way you could bring up records already done for that employee.

 

Let me know if you think this might work.

 

If you want users to manage the underlying data create readwrite views in K2 and they can easily update the lists. The form would see the new data each time it loads.

Reply