cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AdamH
Helper III
Helper III

Drop Down List using a Lookup which is defined by a toggle field.

Hi All, 

 

Scenario I am looking at trying to solve:

 

I have a list of staff, some staff are mentors and some are instructors - or both mentor and instructor. This is defined in their record with a toggle value - for example:

  • Example Staff Record 1
    • Mentor Field (toggle value=true)
    • Instructor Field (toggle value=false) 
  • Example Staff Record 2
    • Mentor Field (toggle value=true)
    • Instructor Field (toggle value=true) 

Within ALL records, I have two drop down lists called Assessor and Mentor (Assessor being instructor)

 

If within a staff record, the Mentor or Instructor toggle is set to (true) - I want my drop down lists to be able to pick their names up as an option within my Assessor or Mentor drop down list. 

 

I've looked at many examples (similar) to what I am looking to do, but I'm unable to find the right code for this. 

 

Anyone have an idea? 

 

11 REPLIES 11
rubin_boer
Super User
Super User

hi @AdamH i may be getting this wrong. you have one list with three columns where two of the columns are mentor or instructor. You can filter your data two include where the two is true.

Filter(YourData, ColumnInstructor || ColumnMentor ) assuming the values are boolean.

 

Hi @rubin_boer 

 

So my SharePoint list has several columns in it. Name, Grade, Email, Mentor, Assessor and so on. 

 

ALL staff records have these columns but some staff are students - some are mentors ect. 

 

IF a staff record has either Assessor or Mentor toggle field set to true, I want the 'Mentor Name' and Assessor drop down to pick this up as an option

 

As an example,

Mentor 1 staff record has Mentor Toggle on (true)

Student 1 staff record I can select drop down Mentor 1 as their mentor. 

 

I hope that makes sense. 

 

example.PNG

 

rubin_boer
Super User
Super User

@AdamH ahh ok.

the combobox for Mentor will be Filter(YourData, YourMentorColumn) and 

Assessor will be Filter(YourData, YourMentorColumn).

 

Both assumes the type of value in the list are boolean. in the event they are not set the condition the way you wish it to be.  I will assume when the Mentor staff member is not a mentor that column will be blank in this case it will be like: Filter(YourData, !IsBlank(YourMentorColumn)) , every entry with something entered will be added. In the event the entries are either yes or no then the filter will be Filter(YourData, YourMentorColumn = "Yes")

 

I hope this helps, but i may still miss your requirement.

 

Hi @rubin_boer 

 

I think your on to something here. I just need to confirm where this filter goes as these drop down fields are linked back to the SP list. 

 

If I select the Mentor Name Data Card - Would i add the code into Default? At present Default has 'Thisitem. 'Mentor Name'

Just want to expand on this problem a little. 

 

The Mentor Name Field (current drop down) that needs to display all the mentor names is setup as a choice field. Would this need to be set as a Single line of text field?

rubin_boer
Super User
Super User

@AdamH is this what you looking for?

rubin_boer_0-1613482610839.png

If so add the filter to the items of the dropdowns

rubin_boer_1-1613482689524.png

 

Let me  know if we moving into the same direction 😉

 

Yes I believe so - 😜

 

InkedInkedrubin_boer_0-1613482610839_L.jpg

If I could just work that out 🙂 

Hi @rubin_boer 

 

It works to a degree, I get a warning but it also picks up data from another column, not sure why this is so.

 

Capture.PNG

AdamH
Helper III
Helper III

@RandyHayes - Any ideas on this ?

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (47,283)