web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Process Template Langu...
Power Automate
Answered

Process Template Language Error with Person Department

(0) ShareShare
ReportReport
Posted on by 284

Hello guys,

I have a problem. I need to check the department of a Person in the Person Field from Sharepoint.

RiccoHipp1903_0-1658149217458.png

Reason is, that there are multiple CEOs based on Departments.

The following Error is Coming Up 

 

Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'startsWith' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#startswith for usage details.'.

 


I just write the Department-Names in the fields, no function is used

 

Categories:
I have the same question (0)
  • rajasubr Profile Picture
    75 on at

    Hello,

     

    This is because of the reason how to mentioned the department names. Like Dep1,Dep3 and etc.

     

    as per the MS article starts with function will expect the text which needs to be found inside a ‘’. Like the below:

     

    startsWith('<text>', '<searchText>')

     

    so, please change and try.

     

    Happy to help you if still the issue persists.

  • RiccoHipp1903 Profile Picture
    284 on at

    @rajasubr I will try it out. But i have to wait to test it. I will come back to you.

  • rajasubr Profile Picture
    75 on at

    Thanks. I will wait for your further response.

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @RiccoHipp1903 

    You say that you are "check the department of a Person in the Person Field from Sharepoint"

    Then you say "I just write the Department-Names in the fields, no function is used".

    What type of column are you referencing in your condition?  A person or group column or a text column?

    Also, if the person or group column allows for multiple entries, you should be in a loop.

     

     

  • RiccoHipp1903 Profile Picture
    284 on at

    Hello Scott,

     

    I'm sorry for beeing unclear.

    The Value I use is from a single Person Column 8No puliple selection or no group selection) the Department from that Column. So in my picture that would be the Column 'Mitarbeiter' and used 'Mitarbeiter Department' in the Power Automate. 

    "I just write the Department-Names in the fields, no function is used" i just write eg. IT, what means it looks like this (not the actual code, just a textform of the picture Condition):

    @{triggerOutputs()?['body/Mitarbeiter/Department']} startswith IT

     

  • rajasubr Profile Picture
    75 on at

    Hi,

     

    I replicated the scenario and it is working fine. Below is a sample picture of my workflow.

     

    Floe before run:

     

    rajasubr_0-1658164574074.png

     

    Flow after run

     

    rajasubr_1-1658164690623.png

    So, I request you to delete the action and retry or just give it a try by simply creating a sample flow.

     

    My SharePoint Sample List:

     

    rajasubr_2-1658164807169.png

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

     

     

  • Verified answer
    RiccoHipp1903 Profile Picture
    284 on at

    that also didn't work for me . 
    I found an alternative. I used the Office365Users Connector before and use the Department Value of this Connector instead of the SharePoint Department Value. That works really well

  • rajasubr Profile Picture
    75 on at

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard