Blog

Power Automate Flow Functions

On 18/06/2020

Power plateform

Power automate flow

 

Functions

Check date is null

if(equals(triggerBody()?['myDate'], null),'[myDate is null]', formatDateTime(triggerBody()?['myDate'], 'dd/MM/yyyy'))

Power apps

Display view on query string value

If ( !IsBlank(Param("taskDisplay")) && Param("taskDisplay")="true"; Navigate(DevTasksView;ScreenTransition.Cover) )

set variable value (separator in english is , in french ;)

Set(CurrentToShow; "loppement") ;; Set(CurrentButton; "DEV")

 

Addind header like this


{
  "Accept": "application/json; odata=verbose",
  "content-type": "application/json; odata=verbose",
  "X-HTTP-Method": "MERGE",
  "If-Match": "*"
}

 

Flow Get Item Send Mail

On 10/06/2020

Microsoft Flow hot to get item by lookup and send a mail, with lookup details

Initialize variable

Initvars

Get lookup datas

Getitem 1

Extract approver datas


{
    "type": "object",
    "properties": {
        "@@odata.type": {
            "type": "string"
        },
        "Claims": {
            "type": "string"
        },
        "DisplayName": {
            "type": "string"
        },
        "Email": {
            "type": "string"
        }
    }
}

Extractdisplayname

Append datas to an array

Appendtoarray

Create an html table

Createhtml

Send the mail

Sendmail

In Tools

String Manipulations

On 23/05/2020

String Manipultions

    • Input Text
    • Text Out
    • Separator
    •  
      Trim
       
      Set replacement is tab
       
      Set replacement is new line
  •  
    • join / concat lines
    • split
    • set Default Values
     
    • trim
    • remove last char
    • remove first char
     
    • Replace separator by tab or new line
    • remove last char
    • Get duplicates
     
    • stringify JSON
    • html encode
    • html decode
     
  •  
  •  
  • Url encoder

    • Input url
    • Output url
    • Actions
      • EncodeUrl
      •  
      •  
      •  
      •  
      • DecodeUrl
 
 

Sharegate Mon Plan De Migration

On 21/05/2020

Les bonnes pratiques que j'ai pu identifier

 

  • Commencer par bien analyser le site à migrer
  • Controler le delta des features natives
  • Faire un pre-check avant de lancer la copie
    • Structure puis contenu
  • Décocher le maximum d'options en cas d'échec, puis les remettre de manière incrémental
  • Sharegatelinkcopyconfiguration
  • Sharegatelistcopyconfig
  • Migrer juste la structure d'une liste, puis vérifier que les formulaires New, Edit et View soient fonctionnels

Si l'on rencontre l'erreur suivante, Custom Scripting is disabled at destination and you do not have sufficient permissions to enable it. You must be Global admin (Tenant admin) in order to enable it. Some items might not be copied.  

et que vous avez coché "Required features"  Sharegaterequiredfeatures

Sharegate n'arrive pas à activer des features nécessaires pour la liste (procédure pour activer des features [liste des features SP2019 complète] )

  •  

Search Cannot Crawl Start Address

On 21/05/2020

Sharepoint Search The Start Address Cannot Be Crawled

even read permissions are good, search cannot crawl, i triied a lot of things found on the net, no one succeded. then i only add a new web application, and start a full crawl. the crawl succeded on each start adress, i don't know why but it works :)

PSONFIG.exe Product Failed

On 15/05/2020

PSCONFIG.exe Configuration of SharePoint Products failed. Configuration must be performed before you use SharePoint Products. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible

An exception of type System.Data.SqlClient.SqlException was thrown. Additional exception information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Check your connection string in HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Shared Tools > Web Server Extensions > 16.0 > Secure > ConfigDB

Sharepoint Query Search By UTC Date

On 09/12/2019

Sharepoint query search by date (UTC date type)
 
When your field is DateOnly => 12/12/2019, search service will store it like : 2019-12-11T23:00:00.0000000Z
 
In your regionnal settings, you can see -1
 
 
So in your query to retrieve you should substract one hour
 
                    
                        var aDate = new Date('2019-12-12);
                        var offset = new Date().getTimezoneOffset();
                        console.log("offset : " + offset);//in my case, offset is -60
                        console.dir(aDate);
                        aDate.setMinutes(aDate.getMinutes() + offset);
                        console.dir(aDate);
                        /_api/search/query='MnpDate:aDate.toISOString()';
                        // aDate : 2019-12-11T23:00:00.0000000Z