I am building an app in which I wanted to pre-populate the field department head based on the department selected from drop down(I don't want to use organisation chart from Microsoft teams) and then save this data into the SharePoint list (Beschaffung).
I tried to create on separate list (Kostenstelle) with departments and department head and bring this info in form but the power apps doesn't save this info in other SP list (Beschaffung).
And also want to bring drop-down list from Kostenstelle to KST (Department) field in form (Beschaffung) to this above task.
How can I solve this problem??
Thanks in Advance!!!
Are you trying to create a separate SharePoint list with Department Head?
And from your app if the department is selected it will Lookup this SharePoint List and assigned the Head automatically.
So I'm assuming you have SP List A that contains the department and the respective head name
You have a Form for SP List B, that will have department head column that will be a Lookup column for SP List A or text column ( I prefer a text column, so the data doesn't get change due to a change in SP List A ).
So in the App, for the Department Head field you can set a Lookup code depending on the department selected to display the Head name .
Is this how you want to set. Will be easier if I can see your code
@indhaa I have not coded this field. For department have created a look up Column in list B which looks up in list A for Departments. But for department head I can't create a lookup column as SP doesn't allow to create a look up column with person/group.
I thought the Head was automatically selected depending on what department was selected on List A.
On List A can you create a separate column and add the Head Name for the respective Head.
I was assuming this is how the List A was setup.
So in the Head Field you can do a Lookup department selected and assign the Head name.