Hello Everyone,
I'm having a problem in having the text showing in the combobox.
DefaultSelectedItems = If(!IsBlank(varTimesheetRecord), Office365Users.SearchUser({searchTerm:varTimesheetRecord.Approver.DisplayName}),Office365Groups.ListGroupMembers("<Group ID>").value)
When i click on the DisplayName on the above code i can actually see/read the name i need - it just doesn't show in the combobox.
Any help would be greatly appreciated.
Thanks | J
Solved! Go to Solution.
Hi @jgellel ,
Is the problem you encountered is that Default Selected Items doesn't show in the Combo Box?
Could you please provide your items property of your Combo Box Control?
I have made a test for your reference.
1. Add a Combo Box Control and apply the following formula on its Items property as:
Office365Users.SearchUser()
2. Select the Combo Box and apply the following formula on its DefaultSelectedItems property as:
Office365Users.SearchUser({searchTerm:DisplayName})
3. Add a new Combo Box and apply the following formula on its Items property as:
Office365Groups.ListGroupMembers("GroupID").value
4. Select the Combo Box and apply the following formula on its DefaultSelectedItems property as:
Office365Groups.ListGroupMembers("47369275-8f08-4db3-9e39-23cf0c4d887e").value
5. You can observe that the table structure returned by the Items of the two Combo Boxes is different, maybe this is the reason for the problem.
https://docs.microsoft.com/en-us/connectors/office365groups/#listgroupmembers_response
So if you use Office365Users.SearchUser() and Office365Groups.ListGroupMembers().value directly in the same If statement , one of the functions will not work.
6.Select the Combo Box and apply the following formula on its DefaultSelectedItems property as:
If(!IsBlank(varTimesheetRecord),Office365Users.SearchUser({searchTerm:varTimesheetRecord}),Filter(Office365Users.SearchUser(),"yes" in ForAll(Office365Groups.ListGroupMembers("GroupID").value,If(displayName = DisplayName,"yes","no"))))
Result Screenshots:
Best Regards,
Charlie Choi
I may be wrong - I can't test this now, but I believe Combo boxes want Records, not fields, so you may be going too far down the tree.
Hi Brian,
So what i'm after is that if var<> record is not blank, the name of the approver (saved in SP List) is to be loaded if not the secretary (listed in Office365Group) is to show as the defaultselecteditems of the combobox.
Thanks | J
Hi @jgellel ,
Is the problem you encountered is that Default Selected Items doesn't show in the Combo Box?
Could you please provide your items property of your Combo Box Control?
I have made a test for your reference.
1. Add a Combo Box Control and apply the following formula on its Items property as:
Office365Users.SearchUser()
2. Select the Combo Box and apply the following formula on its DefaultSelectedItems property as:
Office365Users.SearchUser({searchTerm:DisplayName})
3. Add a new Combo Box and apply the following formula on its Items property as:
Office365Groups.ListGroupMembers("GroupID").value
4. Select the Combo Box and apply the following formula on its DefaultSelectedItems property as:
Office365Groups.ListGroupMembers("47369275-8f08-4db3-9e39-23cf0c4d887e").value
5. You can observe that the table structure returned by the Items of the two Combo Boxes is different, maybe this is the reason for the problem.
https://docs.microsoft.com/en-us/connectors/office365groups/#listgroupmembers_response
So if you use Office365Users.SearchUser() and Office365Groups.ListGroupMembers().value directly in the same If statement , one of the functions will not work.
6.Select the Combo Box and apply the following formula on its DefaultSelectedItems property as:
If(!IsBlank(varTimesheetRecord),Office365Users.SearchUser({searchTerm:varTimesheetRecord}),Filter(Office365Users.SearchUser(),"yes" in ForAll(Office365Groups.ListGroupMembers("GroupID").value,If(displayName = DisplayName,"yes","no"))))
Result Screenshots:
Best Regards,
Charlie Choi
User | Count |
---|---|
254 | |
106 | |
95 | |
50 | |
39 |