Hello,
I have an app that is using some SharePoint lists as the data sources.I am trying to generate a dropdown list in my main list ( RFC) which reads the items from another list (Reviewers)
The items in the drop-down are filtered based on the Level pf approvers (the Name field is person field)
on my main list, I have created another field called L2 approvers(person field)
on the app I could successfully load the required approvers which are marked as L2
I am using the selected value from the dropdown list Datacard
The field gets submitted to the list with no issue
I can see the field on form view mode as well
the issue is when I want to edit the form the drop down is blank and doesn't show the value 😞
thank you for your help
Solved! Go to Solution.
No problem helping you!
So the problem is going to come in on how you have the lookups and the person columns set up.
You're kind of doubling the data in a sense...you have a Lookup to a record that is going to have the name in it, but then you are also storing that name in your list. From a data standpoint, this could be an issue if you have changes in the future to names.
But, that said...
You need to get the record from the Reviewers list that is based on the stored approver name.
The question will be, is there only going to be one record in the Reviewers list that will have that L2 approver name in it? Or will there be multiple rows potentially?
If there are potentially multiple records, then you really need to fall back to relying on the lookup.
But, I have a bigger question for you - If the Reviewers is a lookup and the user can choose the Reviewers in the form AND the reviewers record has a L2 approver named in it...then why is the user then able to edit that in the form? Will this not cause is discrepancy in the data?
Your dropdown is not a DropDown control, it is a Combobox.
As such, you will need to set the DefaultSelectedItems (DSI) property of the control to a valid record that will match the Items property of your combobox.
What is the Items property of the Combobox? And, what is the DSI at this point?
Hi @RandyHayes
Thanks for your reply
DefaultSelectedItems = Parent.Default
the item property is Filter(Reviewers,Level.Value ="L2") reviewer is the list of people in this Combobox I need to just list people who are L2
Yes...so that will *never* match anything!
In your Items you are returning complete records from your Reviewers list. This will have every column in the record.
So, you have two columns in your list - Reviewers and Level2 Approver. I'm referring to the list that the form is based on, not the lookup list (Reviewers).
Let's dig a little deeper:
1) What type of column is Reviewers and Level2 Approver in your primary list (again, not the Reviewers list you mentioned)?
2) What is the Default and Update property formulas for the Reviews and Level2 Approvers datacards?
3) What is the DSI and Items property on the Reviewers combobox?
4) Is Reviewers multi-select or single selection? Same question for Level2 Approvers.
Hi,
1) the Reviewers field is a lookup field and the L2 approver field is person type.
2) both set to Thisitem.'field name'
3)DSI for Reviewers is set to parent. default
4)Both are a single selection
Just wanted to let you know that the L2 approver field submits to mail SharePoint list with no issue, I can see it on the list, just can`t see it on the edit form mode 😞
Thank you for taking the time and helping me
Sorry forgot to add update value for both fields
Reviewers is set to DataCardValue8.Selected
Level2 approver is set to DataCardValue44.Selected.Name
No problem helping you!
So the problem is going to come in on how you have the lookups and the person columns set up.
You're kind of doubling the data in a sense...you have a Lookup to a record that is going to have the name in it, but then you are also storing that name in your list. From a data standpoint, this could be an issue if you have changes in the future to names.
But, that said...
You need to get the record from the Reviewers list that is based on the stored approver name.
The question will be, is there only going to be one record in the Reviewers list that will have that L2 approver name in it? Or will there be multiple rows potentially?
If there are potentially multiple records, then you really need to fall back to relying on the lookup.
But, I have a bigger question for you - If the Reviewers is a lookup and the user can choose the Reviewers in the form AND the reviewers record has a L2 approver named in it...then why is the user then able to edit that in the form? Will this not cause is discrepancy in the data?
Hi @RandyHayes thank you for those questions 🙂 it got me thinking, I have decided to use power Automate and filtering to choose the right L2 approvers. Also, a lesson learned for myself, which is to try to avoid from Lookup fields as much as I can.
Thank you!
User | Count |
---|---|
254 | |
109 | |
92 | |
48 | |
37 |