sharepoint online – Create view that filters by group

Is it possible in SharePoint Online to have views based on the group the user is a member of? For example, if I assign user 1 to group A, and user 2 to group B, would it be possible for user 1 to see only tasks from a list that have a column that would match group A.

I tried creating a column that accepts “Person or Group”, but I don’t know how to filter a view for groups. I know that if we want to filter it for a user, we should put [Me]. Is audience targeting a solution? If so, how would I accomplish it?

web part – Time complexity issue in fetching list items from 2 lists in React Sharepoint?

I am trying to fetch common items from two lists. For eg:- I am displaying full items from first list but there is no name column in the first list, it is in the second list which is of Person or Group type column so I also cannot use expand. So on the basis of ID column (lookup column in First list) I am fetching name from second list but there is issue of time complexity in that. Does anyone know how to reduce time complexity of my code or any alternate might work as well as long as time complexity is less:
I am using REST API call in my code below:

this.state = {healthScreening: (
        {
          Author: "",
          BookingID: "",
          Temperature: "",
          Measured_x0020_In: "",
          Result: "",
          Kit: "",
        },
      ),
};

public function = () => {
$.ajax({
      url: `${this.props.siteUrl}/_api/Web/Lists/GetByTitle('List1')/items?$select=*,Temperature,Measured_x0020_In,Result,BookingID/ID&$expand=BookingID`,
      type: "GET",
      dataType: "json",
      headers: {
        accept: "application/json;odata=verbose",
      },
      success: (resultData) => {
        var listdata = {
          accounting: (),
        };
        var listdata2 = ()
        console.log(resultData.d.results);
        $.each(resultData.d.results, (index, value) => {
            listdata.accounting.push({
              BookingID: value.BookingID.ID,
              Temperature: value.Temperature,
              MeasuredIn: value.Measured_x0020_In,
              Result: value.Result,
              Kit: value.Kit ? "Yes" : "No",
            });        
        });
        console.log(listdata.accounting);
        $.ajax({
          url: `${this.props.siteUrl}/_api/Web/Lists/GetByTitle('List2')/items?$select=Author/Title,ID,BookingStatus&$expand=Author&$filter=startswith(Author/Title,'${this.state.temp}')`,
          type: "GET",
          dataType: "json",
          headers: {
            accept: "application/json;odata=verbose",
          },
          success: (resultData) => {
            var listdata1= {
              accounting: (),
            };

            $.each(resultData.d.results, (index, value) => {
              
             
                var data = listdata.accounting.filter(
                  (index) => index.BookingID == value.ID,
                  
                )
                if (data.length > 0) {
                  console.log(data)
                  listdata2.push({
                    Author: value.Author.Title,
                    BookingID: value.ID,
                    BookingStatus: value.BookingStatus,
                    Temperature: data(0).Temperature,
                    Result: data(0).Result,
                    MeasuredIn: data(0).MeasuredIn,
                    Kit: data(0).Kit,
                   })
                }
             
            });
            
            this.columns1 = (
              {
                name: "Name",
                selector: "Author",
              },
              {
                name: "ID",
                selector: "BookingID",
              },
              {
                name: "Temperature",
                selector: "Temperature",
              },
              {
                name: "MeasuredIn",
                selector: "MeasuredIn",
              },
              {
                name: "BookingStatus",
                selector: "BookingStatus",
              },
              {
                name: "Result",
                selector: "Result",
              },
              {
                name: "Kit",
                selector: "Kit",
              },
            );
            this.rows1 = listdata2;
            console.log(listdata2)
            this.setState({ healthScreening: listdata2 }, () => {});
          },
          error: (jqXR, textStatus, errorThrown) => {
            console.log("error");
          },
        })
      },
      error: (jqXHR, textStatus, errorThrown) => {
        console.log("error");
      },
    });
}

this.rows and this.columns are the field properties of react-data-table-component from npm package.

sharepoint online – Why is SearchExecutor returning results in inconsistent formats and what can I do about it?

I use the following method to find List<File> on our SharePoint site:

    private async Task<List<File>> FindAsync(ClientContext clientContext, KeywordQuery keywordQuery)
    {
        ClientResult<ResultTableCollection> results = new SearchExecutor(clientContext)
            .ExecuteQuery(keywordQuery);
        await clientContext.ExecuteQueryAsync();

        List<File> files = new List<File>();
        foreach (IDictionary<string, object> resultRow in results.Value(0).ResultRows)
        {
            File file = GetFromPath(clientContext, resultRow("Path").ToString());
            files.Add(file);
        }
        return files;
    }

    private File GetFromPath(ClientContext clientContext, string path)
    {
        Web web = clientContext.Web;
        List list = web.GetListByTitle(_sharePointConfig.DocumentsRoot);

        int parameterIndex = path.IndexOf('?');
        string query = parameterIndex >= 0 
            ? path(parameterIndex..) 
            : "";
        System.Collections.Specialized.NameValueCollection queryParts = HttpUtility.ParseQueryString(query);
        string id = queryParts.Get("ID");
        ListItem item = list.GetItemById(id);
        return item.File;                
    }

This works as expected on a Sharepoint site we created specifically so I would not be testing against production data.

However, when I then swapped the siteUrl to reference the production site — hosted on exactly the same instance of SharePoint Online, with the same SharePoint online subdomain — this failed.

Whereas the developer site would return Urls like

https://example.sharepoint.com/sites/DevelopementTestingSite/Shared Documents/Forms/DispForm.aspx?ID=43

on the production site, I get back Urls like:

“https://example.sharepoint.com/sites/Mietkundenseite2/Freigegebene Dokumente/Alle Mietantrag Enpal/von Angenommen ab Mai.2019/20190605_Weiss_11_Mietantrag.pdf”

Because this URL does not contain the ID, the method fails.

Is there a way I can ensure that I always get back the format with the Id?

Alternatively, is there a way I can use the production format to get the corresponding File value?

sharepoint online – Power Automate Approval blocks DoUntil timeout

In Power Automate, I’ve created a workflow with a do-until loop. When I set the timeout to 5mins it times-out and execution continues. I’ve added an approval task within the do-until loop and now the flow is waiting for the user to approve/reject. If I do not approve/reject I would expect the do-until loop to timeout in 5mins, but it doesn’t repect the timeout set in the do until loop and continues waiting.

When will it timeout ?
If I want the approval task to be time limited what can be done?

Thanks

sharepoint server – Creating a new document in a Modern library doesn’t work properly

I was hoping someone could point me in the right direction on a strange problem. In our SharePoint 2019 system we recently installed when you go to a library and click New Document and select a content type with an associated Word template we named “Blank Document”, Word is not launched. Instead a new item called “Document” is automatically created in the Modern library called “Document” but with no extension. When you open the “document” you see what looks like binary but there is a enough readable text to indicate that it is the “blank Document” template. After downloading the item and adding .the docx extension I was able to confirm that it was indeed the “blank document” template.

Here’s the funny part if in the library you switch to Classic mode, everything works fine. So I was wondering whether Modern actually supports the ability to create a document from a template. If does support it what issue could be stopping if from working given it works in Classic? I should point out the above behavior described above is not localized to one just library but happens in every library in our system.

Is it possible to manually trigger a flow on list using SharePoint interface

I have an instant flow on a SP list, which accepts a parameter > Get Items > filter by the parameter and automatically creates some entries in other lists.

This flow works perfectly on flow.microsoft.com but I cannot find a way to call this flow on SharePoint list, on SP interface, without actually going to flow site.

Is this possible? I’m hoping it’s a yes!

Thank you!
Ova

SharePoint list How to restrict input value format

I have a column with name Secure in my SharePoint list. And I want to set validation in that column as below mentioned conditions. and if any user not entered in that format than , he will not able to save the form.

Condition :-

  1. it should contain total 12 characters
  2. first four character should be Alphabet (i.e. A to Z)
  3. next 4 characters should be any number between 0 to 9
  4. next 4 character should follow DDMM format (i.e. DD should allow maximum value 31/30/29/28 as per month and MM should between 01 to 12)

get count of duplicate values in a calculated column in sharepoint list

I have a sharepoint list with data as below.

ID  EN   DE   FR   Val
1   EN1  DE1  FR1   1
1   EN1  DE1  FR1   1
1   EN2  DE2  FR2   2
1   EN2  DE2  FR2   2
1   EN2  DE2  FR2   2
1   EN3  DE3  FR3   3
2   EN1  DE1  FR1   1
2   EN1  DE1  FR1   1
2   EN1  DE1  FR1   1
2   EN2  DE2  FR2   2
2   EN2  DE2  FR2   2
2   EN3  DE3  FR3   3

Now in the above list, i want to group by field Val and sort by the group by count
which means the output should be as below for ID=1

Val2(3)
Val1(2)
Val3(1)

I tried using view, but could not find way to configure the way i want.
So now i am thinking to use calculated field and that field will have the count as below and then group by that calculated field.

ID  EN   DE   FR   Val   cal
1   EN1  DE1  FR1   1     2
1   EN1  DE1  FR1   1     2
1   EN2  DE2  FR2   2     3
1   EN2  DE2  FR2   2     3
1   EN2  DE2  FR2   2     3
1   EN3  DE3  FR3   3     1
2   EN1  DE1  FR1   1     3
2   EN1  DE1  FR1   1     3
2   EN1  DE1  FR1   1     3
2   EN2  DE2  FR2   2     2
2   EN2  DE2  FR2   2     2
2   EN3  DE3  FR3   3     1

Can you please help how i can achieve this. The main reason for this is , i want to show the items with max count of Val field in another list form.

Thanks in advance,
Usha