I'm trying to build a custom Infopath form for a list that contains 2 fields that I would like to get auto-completed:
- Person: people picker field, filled with the current user
- Team: lookup to the Teams list, filled with the team of the user logged in which can be found in the Persons list (each Person is bound to one team)
- List item
To resolve 1), I used the userName() function in Infopath. For 2), I created a new data source that fetches the 'Title' (Text) and 'Team' (lookup) fields in the Persons list. I also created a filter : Form.Person.AccountID = DataSource.Person.AccountID. The logic seems to work when I create a new form in Sharepoint, however the teams get displayed by their IDs (1, 2,...) instead of their text values (team A, team B,....). Moreover, this does not select any value, I also need some kind of formula for the 'default value' box so that it picks up the only available team.