When I started to work with SPFX solutions for SharePoint, I couldn’t understand how to load external CSS files. I came up with one solution, but it was a crutch. I did it with embedding <styles> tag into JSX. It looked like this:
(more...)When I started to work with SPFX solutions for SharePoint, I couldn’t understand how to load external CSS files. I came up with one solution, but it was a crutch. I did it with embedding <styles> tag into JSX. It looked like this:
(more...)A JS/TS useful snippet to return only several last records with sorting by time. The data is stored in localStorage. I can't modify the types for external component, so that's why all the data has string types. and I use 'moment' to convert the strings to the date format.
(more...)While writing the script to create lists for my solution for SharePoint Online I had to rename Title field in a list. It's not so obviously as just to create a new field.
(more...)I like the Ant Design of React and for me it’s very useful. Usually I prefer functionality to a better design and it allows me to achieve a functionality much faster. But when you do something not for yourself, you have a customer and he decides which design better.
(more...)You can get properties of an image from SharePoint library with RestAPI
The request looks like this:
https://markimarta.com/sites/Euro2024/bestboat/_api/Web/GetFileByServerRelativeUrl('/sites/Euro2024/bestboat/VoteLib/Team2/Regal.jpg')/Properties
The result is XML from which you should extract the values you want to use.
I used EventCalendar component with resources and timeline view, the default interval is 1 month, I also add week numbers to the header. I wanted to fit the calendar to the page without horizontal scroll.
(more...)The queries to get all the list items, get list items with specific field values, get list items by ContentType Name. The most of the time I spend with the last one.
(more...)The React snippet of how to update the selected element in the array of objects. The array of objects is connected with useState hook, and on change of Checkbox control the array must be updated.
(more...)Create a console app with .Net Framework 4.7.2 with Dapper and datasource in MSSQL Server or PostgreSQL.
If you create this ancient app, you should only add Dapper and NPGSQL packages from Nuget. The support of MS SQL Server is already built in. The scenario for .Net Framework is from real life, several applications still require this framework.
(more...)Short manual how to execute MSSQL server in Docker in Windows 11. For linux there are the same steps but instead of PowerShell you should use terminal and don’t forget about sudo.
(more...)