Forum Widgets
Latest Discussions
Sharepoint modern List choice column with dynamic values
I want to add a column (of type choice/drop down) to an existing sharepoint online modern list. the choice option i want to provide depends on an other column eg. if column A has department sales then column B should have 3 choice options , ifcolumn B has department finance then column B should have 4 different options to select. how can i achieve this ?swati8826Jan 13, 2025Copper Contributor16KViews0likes3CommentsHow to stop SharePoint list custom column formatting affecting form display?
Hello, I am trying to apply custom formatting to a multi-select 'Choices' column in a SharePoint list. The custom formatting applies consistent capitalisation to choices, and joins them with a delimiter (required as just applying the style removes spaces between choice items). The custom formatting JSON is as below: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "=join(@currentField,', ')", "style": { "text-transform": "capitalize" } } However, when I apply this style to the column through the JSON editor it affects the display of the corresponding field in the form, adding line breaks where they are not wanted, as below. I have tried adding "word-wrap": "nowrap" in the style element of the column format, which works to stop the new lines being added where they are not wanted but prevents logical new lines being added to show all selected elements. I've also tried variations of the "width" property in the style element to try and force the form to use all available space, but to no avail. Interestingly, this only affects 'edit' and 'view' forms (where you are interacting with an existing item) and is not affecting the 'new' form when creating new items. I have custom JSON formatting in the 'Head' section of the form itself, but nothing in the 'Body' or 'Footer' sections. I've tried removing the customisation in the 'Head' but this doesn't resolve the issue. If anyone has any solutions they can offer they would be very much appreciated.SP_RamblerJan 07, 2025Copper Contributor38Views0likes4CommentsHow to read file content for a IRM Protected PDF?
I have a SharePoint Document Library with IRM Protection turned on. I need to read content of the IRM Protected PDF file at the code level (.NET API Endpoint). I am able to get the binary content of the file at the code level, but no PDF Reader is able to read the content of the IRM Protected file. Is there a work around?SiddheshDambeDec 31, 2024Copper Contributor3Views0likes0CommentsNewly submitted items are not displayed when SPFx Field Customizer
When applying the SPFx Field Customizer, the list will be displayed in the old UI. When I post an item to the old UI list, the latest item posted is shown in the list view, but it does not immediately appear on the screen where it is pasted as a web part on the page. Steps: Prepare a list with SPFx's Field Customizer applied Display the target list on the page Display the page and the list in separate tabs Post an item to the target list The item does not appear on the page where the list web part is placed Reloading (F5) on the page sometimes shows or does not show the latest itemtnDec 12, 2024Copper Contributor30Views1like0CommentsIs there a way around running a custom script before all scripts on any web page
I successfully posted a discussion about "Is there a way around running a custom script before all scripts on any web page in SharePoint Online Development" just now, but I cannot find it now. so I tried posting this to verify I can publish a post.ssfangDec 02, 2024Copper Contributor20Views0likes0CommentsIs there a way around running a custom script before all scripts on any web page
Hi, Is there a way around running a custom script before all scripts on any web page in SharePoint Online Development? I know how to create extension component and web parts with SharePoint Framework (SPFx), but I found its scripts is loaded by the framework and is executed too late. So I want to find a way to load my script for any page, including classic and modern pages, in order to take over the data (what data are allowed to be fetched). Besides, my script doens't depend on SharePoint Online objects, and replace the service worker (progressive web apps - Can I have multiple service workers both intercept the same fetch request? - Stack Overflow). After referring toKey features of the SharePoint Framework Important The SharePoint pageHTML DOM is not an API. You should avoid taking any dependencies on the page DOM structure or CSS styles, which are subject to change and potentially break your solutions. SharePoint Framework provides a rich API to customize the SharePoint experience in reliable ways and is the only supported means to interact with the SharePoint page HTML DOM. I found that it is best to do the client-side control by the public REST interfaces used byPnP JS (a safe API for interacting with SharePoint REST APIs and Microsoft Graph APIs) because I think SPFx is mainlyapplicable for UI function (beautification) after data reach the client browser. Thanks!ssfangDec 02, 2024Copper Contributor21Views0likes0CommentsWebpart not rendering filePicked utliizing PnP FilePicker
Hello, I am using SPfx PnP FilePicker property control. When I check the Edge developer tools, I can see the image being saved to SPO, but the image does not render within the webpart. Is there anyway someone can see if I am implementing something wrongly? Thank you! public render(): React.ReactElement<ICallingCardsProps> { const thumbRend = "https://media.akamai.odsp.cdn.office.net/uksouth1-mediap.svc.ms/transform/thumbnail?provider=url&inputFormat=jpg&docid="; let arr = this.props.CallingCards || []; if (this.props.CallingCards && this.props.CallingCards.length > 0) { var contacts = arr.map(el => <div className={`${styles.tile}`}> <div className={`${styles.galleryframe}`}> <img className={`${styles.galleryimg}`} key={el} src={el.filePicker.fileNameWithoutExtension == '' ? el.filePicker.fileAbsoluteUrl : ''} /> <div key={el}>{el.Name}</div> <div key={el}>{el.Email}</div> <div key={el}>{el.PhoneNumber}</div> </div> </div> ) } else { return ( <div className={`${styles.welcome}`}>Use property pane to create new Contact Cards!</div> ) } return ( <body style={{ height: '225px' }}> <div className={`${styles.grid}`}> {contacts} </div> </body> ); } private async uploadFiles(fileContent, fileName, FolderPath) { try { if (fileContent.size <= 10485760) { // small upload let result = await this.sp.web.getFolderByServerRelativePath(FolderPath).files.addUsingPath(FolderPath, fileContent.type, { Overwrite: true }); console.log(result); } else { // large upload let result = await this.sp.web.getFolderByServerRelativePath(FolderPath).files.addChunked(FolderPath, fileContent.type, data => { console.log(`progress`); }, true); } } catch (err) { // (error handling removed for simplicity) return Promise.resolve(false); } } { id: "filePicker", title: "Select File", type: CustomCollectionFieldType.custom, onCustomRender: (field, value, onUpdate, item, itemId, onError) => { return ( React.createElement(FilePicker, { key: itemId, context: this.context, buttonLabel: "Select File", onChange: async (filesPicked: IFilePickerResult[]) => { for (const filePicked of filesPicked) { const filePickedContent = await filePicked.downloadFileContent(); const folderPath = await filePicked.fileAbsoluteUrl this.uploadFiles(filePickedContent, filePicked.fileName, folderPath); console.log('onChange....', filesPicked) } }, onSave: async (filesPicked: IFilePickerResult[]) => { for (const filePicked of filesPicked) { const filePickedContent = await filePicked.downloadFileContent(); const folderPath = await filePicked.fileAbsoluteUrl this.uploadFiles(filePickedContent, filePicked.fileName, folderPath); } console.log('onSave....', filesPicked) } }) ); }, required: true },jordanwallingsfordNov 29, 2024Copper Contributor1.2KViews0likes1CommentWhat is the cause of a 403 error when connecting to a Microsoft List on C#?
What is the cause of a 403 error when connecting to a Microsoft List on C#?wm-thompsonNov 28, 2024Brass Contributor2.6KViews0likes10CommentsColumn formatting not showing in SP2019
Hi there, At our company we're using Sharepoint 2019 and at this moment we are unable to upgrade. Don't ask me why as I'm not in the position to change any of this. I believe we're on buildodsp-next-publish-SP2019_SP2019_20240305.001but I'm not sure. I found this in the source of the page. I am referring to: https://techcommunity.microsoft.com/discussions/sharepointdev/column-formatting-not-showing-when-view-shown-in-a-list-web-part-modern-page-and/161460 In this topic the OP is asking if it's possible to "see" column formatting when embedding a list on a page. As far as I can tell this is impossible as the embedded list does not support this feature. Then I see some people talking about the classic view/page in combination with a "Page Viewer" Web Part. I tried this, but it will then "iFrame" the entire page. Not just the list. This means I also see the header, footer, everything of that particular page... Which I obviously don't want. So I'm asking you: is there a way to embed a list into a page in SP2019, which will respect my column formatting and won't show any of the other stuff on the page, just the list. Right now I'm just trying to create a link on the fly based on some values. But if I can figure this one out, we'll have a bigger wishlist. This is the most important though.. If this is not possible, is there another way I could achieve the same sort of effect (generating a link based on the parameters of a particular item)? The current JSON which works on a view of a list itself, but not on a embedded list on a page: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "children": [ { "elmType": "a", "txtContent": "Edit", "style": { "white-space": "nowrap", "padding": "5px", "border": "1px solid lightgrey", "border-radius": "5px", "margin-right": "5px" }, "attributes": { "href": { "operator": "+", "operands": [ "/sites/USWR000036/_layouts/15/NintexForms/Modern/EditForm.aspx", "?List=", "70e705b9-b409-4856-9091-ab86ccfebe7d", "&ID=", "[$ID]", "&Source=", "https%3A%2F%2Fxxx%2Exxxx%2Exx%2Fsites%2FUSWR000036%2FSitePages%2Fxxxx%2Easpx" ] } } } ] }JelmerNov 27, 2024Copper Contributor18Views0likes0CommentsList query column lookup threshold error
Hi all, (This is for SP Online, not on-site SP) I keep getting this error: "The query cannot be completed because the number of lookup columns it contains exceeds the column lookup threshold." I believe the threshold is 12 for SP Online, and it can't be configured. I execute the query using the GetListItems method. StackOverflow hasn't been much help (I haven't explicitly asked the question on there, though, just from previous questions that have been answered), the only advice to current questions are to reduce the amount of fields in the query (which I can't do), or to make multiple API calls to retrieve the field:value key:value pairs and then merge the data from the payloads - which certainly isn't ideal and I'd like to avoid it if at all possible (unless it's the only way?) Anyone ever had this issue before, and know some way I can edit the query to still return all the necessary field values? Please let me know if you need me to post the query. Thanks!SunVoltNov 26, 2024Copper Contributor6.8KViews0likes7Comments
Resources
Tags
- developer1,218 Topics
- PnP641 Topics
- APIs475 Topics
- Extensibility249 Topics
- Responsive127 Topics
- sharepoint111 Topics
- hybrid81 Topics
- SPFx70 Topics
- SharePoint Online64 Topics
- powershell23 Topics