@sharepoint online
7 TopicsHow do I grab the last user information entered into a peoples column that allows multiple entries?
I have a list I am using the gallery view on. Each item in the list is an activity that the users might want to attend, so I have a people's column called 'Guests' that holds multiple users. For each item in the list, I have a button displayed on each gallery tile that users can click on to add themselves to the activity they like...I did this using JSON formatting. { "elmType": "div" "attributes": { "Class": "sp-card-lastTextColumnContainer" }, "style": { "display": "if(Number([$TotalGuestAllowed]) > 0, 'block', 'none')" }, "children": [ { "elmType": "p", "attributes": { "Class" : "ms-fontColor-neutralSecondary sp-card-label" }, "txtContent": "RSVP" }, { "elmType": "p", "attributes": { "Class": "ms-fontColor-neutralPrimary sp-card-content" }, "children": [ { "elmType": "button", "customRowAction": { "action": "setValue", "actionInput": { "Guests": "=appendTo([$Guests], me)", "TotalGuestAllowed": "=[$TotalGuestAllowed] -1" } } } ] } ] } Each time a user clicks on this button, their name is added to the guest column (which is the people's column that allows multiple entries). Is there a way to grab the name of the last entry into this "Guests" column, after a new user clicks the button? I want to be able to send some information to only the last user entered into this guest column.Solved520Views0likes1CommentSharepoint Search verticals - Search in result source
Hello ! I'd like to make sure that in my sharepoint configuration, in the microsoft search, when my users do a search and select a certain vertical, that the results come from a specific origin of results. So I've created a vertical area that takes the term that the user, but then I can't see what to put as an element so that the search looks specifically in a result source. For example, to search several lists, it would look like this: {searchTerms} (ListID:id-of-my-list OR ListID:id-of-my-list) Except that I need to specify a search order, and I think I'm obliged to go through a result origin. Except I don't know what to replace the ListID with. I've tried several things like sourceId, contentID, ... But nothing seems to work. I think it must be possible because in the PnP Modern Search plugin it's possible to search in a result origin and the way it works (I've looked a little in the code) seems to be similar to microsoft search. I'd be grateful if someone could shed some light on this. Thanks in advance!Solved2.3KViews0likes8CommentsProblems moving files from site to site | PnP Sharepoint
Hello! I have a file with all the paths to different files in different sites of my tenant that I need to move to a Specific Site in the same tenant, so I decided to use the PnP cmdlets for the job. This is giving me problems when I try to move a file to another Site. For starters, if I Use these commands no file is found: Connect-PnPOnline -Url "https://tenant.sharepoint.com" Get-PnPFile -Url "https://tenant.sharepoint.com/sites/Source Site/Documents/" To found a File I have to connect to the site like this: Connect-PnPOnline -Url "https://tenant.sharepoint.com/sites/Source Site" Get-PnPFile -Url "https://tenant.sharepoint.com/sites/Source Site/Documents/myfile.txt" this is giving me problems when I use the move command and I want to move a File from one site to another, because I'll only be able to be connected to 1 site at the same time. The commands I use are these: Connect-PnPOnline -Url "https://tenant.sharepoint.com/sites/Source Site/documents" Move-PnPFile -SourceUrl "https://tenant.sharepoint.com/sites/Source Site/documents/myfile.txt" -TargetUrl "https://tenant.sharepoint.com/sites/destination Site/documents" This is the error I receive when I run those commands: Line | 25 | Move-PnPFile -SourceUrl $file -TargetUrl $trgtmove | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | {"odata.error":{"code":"-2147213276, Microsoft.SharePoint.Deployment.SPMigrationQosException","message":{"lang":"en-US","value":"Failed to verify the existence of source object at | 'https://tenant.sharepoint.com/sites/Source Site/Documents/myfile.txt' due to error 'The system cannot find the file specified. (Exception from | HRESULT: 0x80070002)'."}}} I'm using MacOS with Visual Studio Code. Can someone help with correcting the code or pointing me to the right tools for the job? Also, is the first time I post something here so if I made a mistake, please let me knowSolved2KViews0likes3CommentsSharePoint On-Premises Event Receiver migration to SharePoint Online
Hello, There is a requirement to migrate SharePoint On-Premises sites to SharePoint Online (SPO). Some of the customization in the current 2013 on-prem site include Event Receivers specially ItemDeleting synchronous event. I was checking out SharePoint Webhooks but looks like sync (ing) events are not supported. Do we have any other option to move Event Receiver in SPO Modern experience specially synchronous events? Thank you.975Views0likes2CommentsSharePoint Online Modern Site- formating Table in multliline text column open in classic view
Hello Everyone, I have list in SharePoint modern site. When I copy and paste formated table from word to multline text column and save it. It open the multline column in classic view everytime. If I remove it , it open in modern look. My clients requirement is to use formated table in content. Can someone please guide how to achieve this.1.2KViews0likes3CommentsRetryQuery not working after throttling
Hi everyone, We are using the recommended approach for throttling. Here is the method we are using to execute the requests: public void ExecuteQueryWithRetry(ClientContext ctx, int retryCount, int backOffInterval, ILog LOG) { DateTime startTimeStamp = DateTime.Now; try { int retryAttempts = 0; int retryAfterInterval = 0; bool retry = false; ClientRequestWrapper wrapper = null; LOG.Debug($"Client Context: {ctx.GetHashCode()}"); LOG.Debug($"Throttled : {Throttled}"); if (Throttled) { while (Throttled) { LOG.Debug("Still throttled..."); Thread.Sleep(100); } Thread.Sleep(new Random().Next(500)); LOG.Debug("Throttled finished"); } while (retryAttempts < retryCount) { try { if (retry && wrapper != null && wrapper.Value != null) { LOG.Debug("Execute request with wrapper value..."); ctx.RetryQuery(wrapper.Value); LOG.Debug("Execute request with wrapper value finished"); Throttled = false; return; } else { LOG.Debug("Execute request..."); ctx.ExecuteQuery(); LOG.Debug("Execute request finished"); Throttled = false; return; } } catch (WebException ex) { var response = ex.Response as HttpWebResponse; // Check for throttling if (response != null && (response.StatusCode == (HttpStatusCode)429 || response.StatusCode == (HttpStatusCode)503)) { Throttled = true; wrapper = (ClientRequestWrapper)ex.Data["ClientRequest"]; retry = true; string retryAfterHeader = response.GetResponseHeader("Retry-After"); if (!string.IsNullOrEmpty(retryAfterHeader)) { if (!Int32.TryParse(retryAfterHeader, out retryAfterInterval)) { retryAfterInterval = backOffInterval; } } else { retryAfterInterval = backOffInterval; } LOG.Warn($"We got throttled! Will back off for {retryAfterInterval} seconds."); } else { LOG.Debug(ex.StackTrace); throw; } } Thread.Sleep(retryAfterInterval * 1000); retryAttempts++; } throw new MaximumRetryAttemptedException($"Maximum retry attempts '{retryCount}' has been attempted."); } finally { if (LOG.IsDebugEnabled) { TimeSpan duration = DateTime.Now - startTimeStamp; LOG.Debug($"Executed CSOM query in [{duration.TotalMilliseconds.ToString("0.00")}] ms"); } } } We got the 429 error and after that we wait the recommended time until we execute again the request. The request is re-executed using the RetryQuery method. After the method is called, we got no error but the request is not executed. Do you have any ideas why we encounter this problem?1.8KViews0likes2CommentsTrack Activities in SharePoint
Hi, Can someone help me on how to monitor these activities in SharePoint and the goal is to send email reminder once the the activity should need to start based on the frequency that you can see in the table below. this is the sample data. hoping to receive your response, kind people 🙂766Views0likes1Comment