Microsoft. Lists - Possibility to set default Value according to List-View

Franz Fuchs 20 Reputation points
2024-04-07T05:35:27.5833333+00:00

Hello,

I created a list which holds Data of different customers.

Afterwards I have created a List-View for each customer and displayed this view in the corresponding MS-Teams Channels.

The Question:

Ist there a Option that the default value (customer name), in a new entry, is set according to the view, the user is currently using ?

Example:

User is in View "Customer2"
select "new Entry"
then the Value in the "Customer"- field should be "Customer2"

Microsoft 365 and Office SharePoint For business Windows
Microsoft Teams Microsoft Teams for business Other
0 comments No comments
{count} votes

Accepted answer
  1. Emily Du-MSFT 51,836 Reputation points Microsoft External Staff
    2024-04-08T08:55:01.2566667+00:00

    Based on your post, I understand that the auto fills in the column value with current view name.

    Per my test, currently there is no method to achieve this.

    Until now, you could only auto fill in the people or group column value with current user through PowerApps. Here are steps:

    1.Go to the list -> Integrate -> Power Apps -> Customize forms.

    2.Click FormScreen1 on the left Tree view -> Advanced on the right -> OnVisible -> Fill the text box with following code.

    1

    UpdateContext({    
        CurrentUser: {    
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",    
            Claims: "i:0#.f|membership|" & Lower(User().Email),    
            Department: "",    
            DisplayName: User().FullName,    
            Email: User().Email,    
            JobTitle: ".",    
            Picture: "."    
        }    
    })
    

    3.Click the people or group column DataCard on the left Tree view -> Advanced on the right -> Unlock to change properties -> Fill the variable with “CurrentUser” in the Default column.2

    4.Save and publish the form to SharePoint. Then you can see the people or group field has been filled in with the current user when you click "New item" in your list.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.