I hope somebody can help me with this.
I am currently working on a Custom Section on my Umbraco Site and then I have a property in my custom object "Account" a property named "Supervisor". In which it points to a member.
My problem now is that when the dialogService opens it shows all member Types. Is there a possibility to be able to filter or to set the dialog for the member picker to only allow "Supervisor" member type?
Hi Phillip and welcome to the Umbraco developer forum :)
I'm not sure whether or not it's possible to add a filter property to the options object since it's not mentioned in the documentation but I had a scenario where I used the contentPicker method and needed to do some filtering and I tried adding filter:'myDocType' to the options object, which turned out to work.
So perhaps you can try seeing if this works with the memberPicker too?
Another approach might be to filter the returned members afterwards using the memberTypeResource perhaps? I don't know what the resource contains or does since the documentation page is currently blank - https://our.umbraco.org/apidocs/ui/#/api/umbraco.resources.memberTypeResource - But perhaps it contains some methods that might be useful to you?
DialogService.MemberPicker Filter
Hi Everyone,
I hope somebody can help me with this. I am currently working on a Custom Section on my Umbraco Site and then I have a property in my custom object "Account" a property named "Supervisor". In which it points to a member.
My problem now is that when the dialogService opens it shows all member Types. Is there a possibility to be able to filter or to set the dialog for the member picker to only allow "Supervisor" member type?
Any help will be much appreciated.
Thanks, Philip
Hi Phillip and welcome to the Umbraco developer forum :)
I'm not sure whether or not it's possible to add a filter property to the options object since it's not mentioned in the documentation but I had a scenario where I used the contentPicker method and needed to do some filtering and I tried adding filter:'myDocType' to the options object, which turned out to work.
So perhaps you can try seeing if this works with the memberPicker too?
Another approach might be to filter the returned members afterwards using the memberTypeResource perhaps? I don't know what the resource contains or does since the documentation page is currently blank - https://our.umbraco.org/apidocs/ui/#/api/umbraco.resources.memberTypeResource - But perhaps it contains some methods that might be useful to you?
Hope these pointers can help.
Looking forward to hearing from you.
/Jan
is working on a reply...