Lists
3011 TopicsHow to calculate the number of business days between created date column and todays system date?
I am trying to calculate the count of business days between the SharePoint system created column and Today system date but just for business days. Initially, I created the calculated column Days Open and it worked perfect, but I do not know how to create a formula that only counts the business days. Can anyone help me with this? =TODAY()-Created21Views0likes1CommentColumn Validation Evaluation Changes
Hello! I'm wondering if I am going crazy, but I have seen breaking changes to a couple of client tenancies where column validation is now occurring for any item/file creation or modification event. This was not happening a month or so ago, and I've got evidence of that with files being able to be placed in a library previously, and not, now. This is because it is clearly trying to validate on column information that is not entered by the (flow) creation of the file. If I were to try to deal with this INSIDE the validation formula for all my lists, ever ... this could effectively cripple me! 😅 --- I'm not posting a problem that needs fixing, here, so please, I do not need to be asked what I have and haven't tried ... I'm simply asking if others have noted a similar thing happening.122Views1like3CommentsPb formating columns
Hello, I used JSON to format the columns of a list. It works fine when I'm in design mode on my list. However, when I embed this list into a web page, from a Web Part, it no longer works. The formatting is removed. Do you have any ideas on how to resolve this issue, please ? Below is the JSON code of the column : { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "attributes": { "class": "=if(@currentField == 'Divers', 'sp-field-severity--good', if(@currentField == 'Note information', 'sp-field-severity--low', if(@currentField == 'Travaux', 'sp-field-severity--warning', if(@currentField == 'Organigramme', 'sp-field-severity--severeWarning', 'sp-field-severity--blocked')))) + ' ms-fontColor-neutralSecondary'" }, "children": [ { "elmType": "span", "style": { "display": "inline-block", "padding": "0 4px" }, "attributes": { "iconName": "=if(@currentField == 'Divers', 'CheckMark', if(@currentField == 'Note information', 'Forward', if(@currentField == 'Travaux', 'Error', if(@currentField == 'Organigramme', 'Warning', 'ErrorBadge'))))" } }, { "elmType": "span", "txtContent": "@currentField" } ] } 1: Rendering the list in design mode 2: Rendering by adding the list to a web page Thank you in advance for your help. Sincerely, Fabien36Views0likes3CommentsPb with formating column
Hello, 🙂 I would like to format a column in a list. This column displays the name of a person in our AD along with their email address. I found the JSON code in this community. When the column doesn't correspond to an AD user, I would like to display text located in another column. To do this, I included a condition in the code. But it doesn't work. The field remains empty when the person is not associated with the column. The portion of code that is probably problematic : "txtContent": "=if([$person.title] == '', [$FullName], [$person.title])" $FullName is the name of an other column : { "CellPhone": "XX XX XX XX XX", "ContentType": "Contact", "ContentTypeId": "0x01060062E91085FE5F6C468F33BBF1D871B1F7", "FileRef": "/sites/dsnb/it/Lists/Phones/1_.000", "FirstName": "", "FolderChildCount": "0", "FSObjType": "0", "FullName": "SERVICE 01", "ID": "1", "ItemChildCount": "0", "PermMask": "0x7ffeffffffffffff", "SMTotalSize": "236", "WorkPhone": "" }, { "CellPhone": "YY YY YY YY YY", "ContentType": "Contact", "ContentTypeId": "0x01060062E91085FE5F6C468F33BBF1D871B1F7", "FileRef": "/sites/dsnb/it/Lists/Phones/2_.000", "FirstName": "Toto", "FolderChildCount": "0", "FSObjType": "0", "FullName": "SERVICE 02", "ID": "2", "ItemChildCount": "0", "PermMask": "0x7ffeffffffffffff", "SMTotalSize": "296", "WorkPhone": "AA AA AA AA AA" } Could you please help me with this? Thank you in advance. Ci-dessous le code JSON : { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "children": [ { "elmType": "div", "style": { "background-color": "=if(length(@currentField) == 0, '#ddd', '#aaa'", "border-radius": "1.5em", "color": "white", "height": "1.5em", "min-width": "1.5em", "position": "absolute", "right": "1em", "text-align": "center", "top": "0" }, "txtContent": "=length(@currentField)" }, { "children": [ { "children": [ { "attributes": { "href": "='mailto:' + [$person.email]" }, "children": [ { "elmType": "div", "style": { "font-size": "1.2em" }, "txtContent": "=if([$person.title] == '', [$Fullname], [$person.title])" }, { "elmType": "div", "style": { "color": "gray" }, "txtContent": "[$person.email]" } ], "elmType": "a", "style": { "margin-left": "0.5em" } } ], "elmType": "div", "style": { "display": "flex", "flex-direction": "row", "justify-content": "center" } } ], "elmType": "div", "forEach": "person in @currentField", "style": { "justify-content": "center", "margin-top": "=if(loopIndex('person') == 0, '0', '1em')" } } ], "elmType": "div", "style": { "align-items": "start", "flex-direction": "column", "min-height": "1.5em" } }46Views0likes2Commentshow to get files of a specific folder path in sharepoint using /lists graphapi
i was able to get folders of a specific folder path using /drives but in /lists it will return files also not just folders unlike /drives , i already made a python script to retrieve files from documents in sharepoint , but now i need to get files of a specific folder not the whole documents folders here is the graph api url to retrieve folders from a specific path https://graph.microsoft.com/v1.0/sites/siteId/drives/driveId/root:/General/index/images/animals:/children?$top=15 here is my python script to get files and folders using /lists async def fetch_file_details(session, url, headers): async with session.get(url, headers=headers) as response: print(f"headers {response.headers} ") return await response.json() async def get_all_images_in_library(accessToken, siteId, libraryId, batch_size=15): url = f"https://graph.microsoft.com/v1.0/sites/{siteId}/lists/{libraryId}/items?top={batch_size}" headers = { 'Authorization': f'Bearer {accessToken}', 'Accept': 'application/json', 'Prefer': 'HonorNonIndexedQueriesWarningMayFailRandomly' } async with aiohttp.ClientSession() as session: while url: async with session.get(url, headers=headers) as response: if response.status != 200: print(f"Failed to fetch: {response.status}") retry_after = response.headers.get('Retry-After') throttle_limit_percentage = response.headers.get('x-ms-throttle-limit-percentage') throttle_scope = response.headers.get('x-ms-throttle-scope') throttle_reason = response.headers.get('x-ms-throttle-reason') print(f"headers {response.headers} ") if retry_after: print(f"Retry-After: {retry_after} seconds") if throttle_limit_percentage: print(f"Throttle Limit Percentage: {throttle_limit_percentage}%") if throttle_scope: print(f"Throttle Scope: {throttle_scope}") if throttle_reason: print(f"Throttle Reason: {throttle_reason}") break data = await response.json() items = data.get('value', []) if not items: break tasks = [] for item in items: webUrl = item.get('webUrl', '') if webUrl.lower().endswith(('.jpg', '.jpeg', '.png', '.gif')): fileDetailsUrl = f"https://graph.microsoft.com/v1.0/sites/{siteId}/lists/{libraryId}/items/{item['id']}?expand=fields" task = fetch_file_details(session, fileDetailsUrl, headers) tasks.append(task) if tasks: batch_results = await asyncio.gather(*tasks) yield batch_results await asyncio.sleep(0.1) url = data.get('@odata.nextLink') my question is how can i get files and folders from a specific path using /lists ?196Views0likes2CommentsSorry, you can't create a new item with Quick Edit
Sorry, you can't create a new item with Quick Edit because this view is missing one or more required columns. To create a new item, please click "New Item" or add the required columns to this view. I want to fill up a list in Quick edit mode but I always receive this kind of notification. All my field are optional in common way it has no problem to create or edit an item, but Quick edit mode does not give the possibility to do that.Solved21KViews0likes13CommentsHow to pass a value from the PropertyPane to the webpart in SPFx?
I have made a SharePoint webpart with the PnP ListPicker on the PropertyPane of the webpart and the PnP DateTimePicker on the webpart itself. How can I pass the value "Lists:string|string[]" on the PropertyPane: export interface IPnPDatePickerWpWebPartProps { lists: string | string[]; // Stores the list ID(s) } To the OnChangeEvent that resides on the webpart itself: private handleChanged = async (date: Date): Promise<void> => { await sp.web.lists.getByTitle("xxxxxxxx").items.getById(103).update( { 'CustomDate': date } ) }; Gr. P9Views0likes0CommentsSum for a Calculated Column
I am tracking invoices for projects throughout the year. The columns in my SharePoint list include: PROJECT TITLE JAN, FEB, MAR… DEC (monthly invoice amounts, formatted as currency) TOTAL (a calculated column that sums the monthly values) The issue I’m facing is that I can see the Sum for each month at the bottom of the view, but I cannot see the Sum for the TOTAL column. Since it’s a calculated field, SharePoint won’t let me display its sum. If anyone knows how to work around this, I’d be incredibly grateful!68Views0likes2CommentsColumn filter bug?
Hi all, does anyone know if this is a bug or a pretty bad feature? While trying to filter a text column users start having issues with some sort of autoselecy feature. When they write the first letter SP autoselect the item and this happen all the time the user press a key, so if you want to filter for a specific field you need to delete all the letters that the system add, becouse if you just press the next letter you'll be at the end of the autoselect suggestion (img.3). This is an issue when people need to filter in list with high number of items with for example code the are the same for the first 5-6 characters Thank in advance for any suggestion, the issue started yesterday. Francesco160Views2likes5CommentsHow to set a SharePoint list to be sorted by today's date as the default?
I have a SharePoint list which contains a column DateTime called Datum. How can i sort the list on Today's date. I.o.w: how can i make the row of Today's date on top of the list. Maybe in the JSON-code? Gr. p60Views0likes2Comments