Posts

Showing posts from 2024

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 need to click both (not at once

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() {         Id = int.Parse(r["Id"].ToString()),        

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, {     Cert2_x002d_OrgAd:cert2_orgAd.Text,      Cert2_x002d_Title: cert2_title.Text,     Cert2_x002d__x0023_:cert2_No.Text,