Hot answers tagged

1

You could call another Rest API in the success function of the first. private userData = () => { $.ajax({ url: `${this.props.siteUrl}/_api/Web/Lists/GetByTitle('APP_NAME1')/items?$select=*,BookingID/ID&$expand=BookingID`, type: "GET", dataType: "json", headers: { accept: "application/json;odata=verbose&...


1

Based on your last question at: Item not fetching using lookup in React Sharepoint, You need to make nested REST calls to get the information from another list. Below are general steps you can perform to achieve this: Make first REST call to get the information related to Booking item: <siteUrl>/_api/Web/Lists/GetByTitle('APP_NAME')/items?$select=*,...


1

This is a known behavior of SharePoint. Extending Person or Group field using lookup columns is not supported in SharePoint. So, you will not be able fetch or add any filter on Person or Group field from lookup list. To get the data from 2nd list, you need to use nested REST call. You can filter the list items based on the item ID you will get from BookingID ...


1

You can use addValidateUpdateItemUsingPath to create list items inside folder. Sample code: const listPath = `${webRelativePath}/Lists/ListUri`; sp.site.rootWeb.lists.getById(ListId).addValidateUpdateItemUsingPath([ { FieldName: 'Title', FieldValue: 'TestItem' } ], `${listPath}/FolderPath`).then(console.log); To get items inside folder, you can try ...


1

Unfortunately, you can’t do that. There is no supported way of hiding apps installed in a site from the site contents view.


1

Above issue occur, if resource Id is not correct. When we define permission in Package.Json "webApiPermissionRequests": [ { "resource": "spfx", "scope": "user_impersonation" } ] Resource means your Azure Active Directory instance name. It should match and scope should also be defined in that AAD instance. ...


1

It is probably another error. I suggest you try to approve with powershell, this will give you a better error message. I had the same issue, and the reason was that I missed one space in the resource name. With powershell, I got a better error message. https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aadhttpclient#manage-permissions-with-powershell


1

Since you have already noticed that the JSON elements for the ProductImage0 column is represented as a string instead of a JSON object, otherwise I could have easily access the Url that I can reference to in the Img tag later. could you not try something like: public render(): React.ReactElement<IEmployeeStoreProps>{ return( <div> ...


1

Need to set up correct spfxContent like this in WebPartName.ts: public onInit(): Promise<void> { return super.onInit().then(_ => { // other init code may be present sp.setup({ spfxContext: this.context }); }); }


1

My test code for your reference: public onChangeBudget = (value: string) => { let newValue=value.replace(/,/g, ""); let abc = newValue.replace(/\B(?=(\d{3})+(?!\d))/g, ','); return this.setState({ Budget: abc }); } Test result:


1

The headline attribute in TeachingBubble component needs a string value. As a workaround,we could add html element in the content part. Test code: {teachingBubbleVisible && ( <TeachingBubble target="#targetButton" primaryButtonProps={examplePrimaryButtonProps} secondaryButtonProps={...


1

Yes, you can use React in SPFx extension, please take a reference of below sample: https://github.com/pnp/sp-dev-fx-extensions/blob/master/samples/react-aadtokenprovider-bot/README.md


Only top voted, non community-wiki answers of a minimum length are eligible