Posts

Sharepoint Rest Api in SPFX Update/Create taxonomy field value

 Scenario - creating custom form for SPListItem, with stuff... all html/css/js/ts When sending primitive values such as string/number/bool/choice, you just need to find the internal name of your field and give the actual value, example: Title : "My Awesome Achievements!!" to find the internal name just go to your SPList => list settings -> click your column => on the end of the URL you will find  &Field=MyFieldInternalName so if my field is named "My Best Quality" and you click that you should see something like "myBestQuality" and your code should send {    Title : "My Awesome Achievements!!",    myBestQuality : "I Can Think!"  } PS - the internal name can be very very different from the Display Name. PS2 -  the internal name be encoding like "_x8473_x8573", in that case your internal name is " odata_ _x8473_x8573" When we want People columns we need to get the userId and send that while adding "Id...

Integrate Monday with SharePoint and Office365 Power Automate

Image
 I must say it was fairly simple. Step 1 - Buy Premium Power Automate Account BTW you can try the Trial and get 25 licenses for free for 1 month. You need to go to your admin center to the marketplace (or ask IT) for the Power Automate Premiun license, and assign it to the user that is going to create the automation.  He also must be board admin in the Monday. link is like this  https://admin.microsoft.com/?source=applauncher#/catalog Step 2 - Install app on Monday This app just create some webhooks for Power Automate and the connection ect. IMPORTANT  this is not an official MS app, just some 3rd party.  You could develop hooks if you have restrictions. This is what you need to see PER BOARD to know its working. Again you must have Board Admin  role. Step 3 - Start a Monday Automation Create a flow and search monday or user the main search bar to get suggestion IMPORTANT - when you start he will open a popup with 2 buttons to complete the connector. You ne...

create spfx with angular, no generators or dependencies, with auto-save

SPFX 1.19,  Angular 18 everything in my git, all tutorial in README, all code included  https://github.com/bresleveloper/angular-spfx/tree/main

define not working with spfx / sharepoint online

 usually when we use modern plugins you will see something like this in the top of the JS file: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).SOMEPLUGINNAME=e()}(this,(function(){"use strict"; //more js code BUT you will see errors like "SOMEPLUGINNAME is not defined", "cannot find module", ect. the reason is that MS overrides so many things and "define" as well, and i am not sure why it fails. BUT all that code wants to find the the "Window" object as named above  globalThis So lets help him and change to  !function(t,e){(t="undefined"!=typeof globalThis?globalThis:t||self).SOMEPLUGINNAME=e()}(this,(function(){"use strict"; //more js code or even just  !function(t,e){ globalThis .SOMEPLUGINNAME=e() } BTW for adding all t...

Host Angular app INSIDE C# Web Api 2 (as single app) (not .Net Core) and install in server (and browse from outside)

Image
Host Angular inside ANY C# / ASP.NET solution. Table of Content: Web Dev Tools List Create DB (ms-sql) Create API (c# webapi 2) + connect to DB Create Angular project  + connect to API Host the NgApp inside the API Install in Server + connect from internet 1. Web Dev Tools List The list of tools : they are all "Next,  Next, Next...", and they are all on google search, SSMS - Sql Server Management Tool - for SQL (also installs server) VS22 - Visual Studio 2022 Community - dont forget to check Asp.Net dev tools with .Net framewroks 4.6.1-4.8 VSC - Visual Studio Code NodeJS (version compatible to the angular version) Angular (your version) For server install - windows server (2022) with IIS 2. Create DB Open SSMS (type "SQL" in start) There, copy your server name (before click "Connect"): Create a DB and a Table (just right-click -> "New..." and give names) Make sure you have an "Id" columns that is key identity, by double-clicking the ...

3 Simple ways to retrieve generic SQL data with C# / WebAPI controller (using DataRow)

Image
Full Code in the end! :) Assuming you have some connection string: private static string ConnectionString = ConfigurationManager.AppSettings["myConnStrApp"]; And assuming we are using the simple "SqlDataAdapter", our Method will start with: using (SqlConnection conn = new SqlConnection(ConnectionString)) {       using (SqlDataAdapter adp = new SqlDataAdapter("SELECT * FROM " + tblname, conn)) {             DataSet ds = new DataSet("ds");             adp.Fill(ds); We have 2 generic options return (convert to) Json String build json object Lets 1st mention the "standard" way - by class model. That means we need to create a new C# class per sql table, and then create matching parsing mechanism, meaning that the rest of our method contains this (see more in the end): var rows = ds.Tables[0].Rows; for (int i = 0; i < rows.Count; i++) {     var r = rows[i];     t.Add(new TNG() {     ...

PowerApps Patch new SharePoint list item with conditional / dynamically adding fields

Important   if you get an error that says: powerapps patch sharepoint list error the specified column "" does not exist the column with the most similar name is "" that would be because you use the column DisplayName instead of the InternalName Solution:  Set(oItem, {     Title:me.displayName,     EmpITref:{Id:meSP.ID, Value:meSP.Title},     EducationLevel:EducationLevel.SelectedText.Value,     CertCount:vis,     WorkYearsExp:WorkYearsExp.SelectedText.Value,     anythingElse:anythingElse.Text,     DigitalSignature:DigSign.Text }); If(vis<>0, Set( oItem, Patch (oItem, {     Cert1_x002d_OrgAd:cert1_orgAd.Text,      Cert1_x002d_Title: cert1_title.Text,     Cert1_x002d__x0023_:cert1_No.Text,      Cert1_x002d_GrantDate:cert1_grant.SelectedDate,     Cert1_x002d_exp_x002e_Date:cert1_exp.SelectedDate }))); If(vis=2, Set( oItem, Patch (oItem, {   ...

Share Folder to Multiple External Users one by onne - Power Automate (item created)

Image
 Scenario: there is a new SP sub-folder every day with some files. this needs to be shared to about 40 different emails daily. BUT with 2 exclusions: 1. sometimes we want these 35 emails, sometimes some other 38 emails. so every day we exclude a few emails, every day different ones. 2. we do not want the "clients" to know about one another, so no bulk sharing or just external link, only share 1 by 1. SOLUTION: 1. SPList for emails ("clients") 2. SP Library containing "main" folder, inside we create daily SP sub-folder with a name (usualy just the date like "25.8.23") 3. SPList for trigger the flow (power automate) on item created, getting from+archive for daily broadcast 4. flow for filtering out excluded emails, and sending 1 by 1 a share email. lets go 1. SPList for emails ("clients") really nothing other than new list, Title for "client name" and another text field for email 2. SP Library containing "main" folder,...