I created an app for SharePoint 2013 (HTML/JS). This app contains 2 lists:
- Leave Requests
- Leave Types
"Leave Requests" list has a lookup field that gets the values from "Leave Types" list.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field
ID="{f3fca7f2-7232-4d5a-ba45-e6f5417fbc73}"
Name="LeaveType"
DisplayName="Leave Type"
Type="Lookup"
List="Lists/LeaveType"
ShowField="Description"
Required="TRUE"
Group="Leave App Columns">
</Field>
</Elements>
I also added the items for "Leave Types" (I can see the items when opening the table). However, if I try to create a new item on "Leave Requests" list, the Leave Type field has an empty dropdown box.
What am I missing?
Why is the dropdown box empty?
Best Answer
I tried to follow the steps in the link below...
http://www.sharepointnutsandbolts.com/2012/08/create-lists-content-types-files-etc.html
...but the dropdown was still empty. I believe I had renamed a few fields and the old names were still referenced somewhere in the XML files. I deleted and recreated the lists, then everything worked as expected.