0

I have this field in my French-Canadian ParentList: 'Gender', with 'Male' and 'Female' as choices.

I have another field in this French-Canadian ParentList: 'Position', which is a look-up field to a ChildList.

Why do I specify 'a French-Canadian' list? Because if I would be lucky enough to be born in a place like France where the position titles are always on the "masculine" flavor whether for women or men, I would not be asking this question now. My problem is, apart the fact my parents thought Quebec as a decent place to have kids, SOME elements in my ChildList are usable only for women, some only for men and some for both. Like this: On the facility Quebecers have to complicate easy stuff

Of course, I want my Look-up drop-down list to show only the right elements, depending on the gender.

  • I thought of using a calculated column, but it is more complicated than "if this is true, show it. Otherwise, don't show it".
  • I thought of using Codeplex's 'SharePoint Filtered Lookup Field', but since it had not been edited since 2009, I hesitate a lot.
  • I thought of using Codeplex's 'SPServices.SPCascadeDropdowns', but since some of my child elements can point to two elements, I foresee a bug.
  • I can not use InfoPath or other 3rd companie'$ $olution$. I can use SP Designer and some imagination for a work-around.
  • Is it possible for a look-up field to point to another list if...? (Like use 'Female list' if Gender='Female' otherwise use 'Male list')
  • Maybe a workaround would be 1- to get rid of the yes/no columns for each element and instead, 2- to have a 'male title' AND a 'female title' and choose accordingly?

What would be the best approach?

1

So if I understand correctly, if the gender is male, you want to see items in the lookup list where Male is Oui, and when the gender is female, you want to see items where Female is Oui?

  • I don't think a calculated column will work because it is dependent on a value in the parent list. Your calculated column in the child list will not have access to that value.

  • SPServices can easily handle this. You dynamically build your CAML query based on the value of gender in your parent list and use that CAML query in your SPCascadeDropdowns call.

  • You could use different lookup lists, but you would have to use SPServices and SPCascadeDropdowns anyway, so you might as well just use the above method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.