Thank you for visiting my site!

Home / Power Automate - Flows / Tips – Flows

Tips – Flows

  1. Turn on the modern experience for PowerApps:

    ——————————
  2. Terminate a flow
    https://d365demystified.com/2020/07/23/terminate-a-flow-with-failed-cancelled-status-power-automate/
    Add an Action-> Control -> Terminate
    _______________
  3. Date Time:

    FormatDatetime(utcNow(), ‘mm/dd/yyyy’)

    Format in time zone of user:
    convertFromUtc(utcNow(), ‘Pacific Standard Time’, ‘mm/dd/yyyyTHH:mm:ss’)
    —————————–

  4. Get the site Url:
    create a variable: strSiteUrl
    first(split(triggerOutputs()?[‘body/{Link}’], ‘/_layouts’)) =  https://sh/sites/sitename/subsitename

    build an Edit Link:

    concat(‘<a href=”‘,variables(‘strSiteUrl‘),’/Lists/Innovations/EditForm.aspx?ID=’,triggerOutputs()?[‘body/ID’],'”>edit</a>’)
  5. send an Edit Link in Email
    create a Compose – add a function:
    concat(‘<a href=”‘,’/sites/dev/Lists/DocumentsCollectFeedbackCustomTasks/EditForm.aspx?ID=’,body(‘Create_task_item’)?[‘ID’],'”>Edit Item</a>’)

    concat(‘<a href=’, triggerBody()?[‘{Link}’], ‘>’,’Click Here to Access Form’,'</a>’)
  6. ___________________
  7. Build a link:
    concat(‘<a href=”‘,triggerOutputs()?[‘body/{Link}’],'”>’,triggerOutputs()?[‘body/{Name}’],'</a>’)
    ———————————————-
  8. Format a column in the List
    add a link using an existing column

    [code] {
    "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
    "elmType": "a",
    "txtContent": "@currentField",
    "attributes": {
    "href": "=@currentWeb + ‘/Lists/’ + @currentField",
    "target": "_blank"
    }
    }
    [/code]

    —————————————

  9. Check if Get Items Action returns more than one record.
    Zero
    https://www.c-sharpcorner.com/blogs/check-if-get-items-action-returns-more-than-0-records-using-flow
    condition
    length(body(‘Get_items’)?[‘value‘]) ‘is greater then’ 0
    length(outputs(‘Get_items’)?[‘body/value’]) ‘is greater then’ 0
    ______________________________
  10. Check if item change is a folder or item:
    compose – isFolder: body/{IsFolder}
    isFolder isEqual false
    to add to Flow triger @equals(triggerOutputs()?[‘body/IsFolder’],’false’)
    —————————————————
  11. How to check if People picker field is null
  12. Check if User email is not empty:
    empty(triggerOutputs()?[‘body/Approver1/Email’])
    is not Equal to
    (expression)true
  13. Convert an arrays to string, remove characters
    [“P2P”,”AVS”] to P2P, AVS
    In Compose:
    replace(replace(replace(string(variables(‘varMyVar’)),'[‘,’ ‘),’]’,’ ‘),'”‘,’ ‘)

ADD YOUR COMMENT