Hi,
I want to create a teams page based on a sharepoint list input (customer name, location and project number). The trigger is when a list item is created and information is entered. After that the flow must check if the teams page already exists for that specific customer name. If not it needs to create a teams page, if it exists it needs to create a channel with the "location - project number" as the channel name.
I am however stuck that for every false value a new teams page is created, how can I check if the name of a customer already has a teams page and if not only create 1 teams page.
below the first draft of the flow:
Thanks, Jeroen
Solved! Go to Solution.
Hey,
I would do it like this: (You have to loop [apply to each] Channels as well, not only Teams...)
Create a string variable (Initialize variable action) called something like "TeamAlreadyExists" and set the value to No.
Then get all Teams with the "List Teams" action.
Then you have to also use the "List Channel" action inside your loop to list all channels inside all Teams.
Inside that loop you then have the Condition action where you check if the Channel Name contains the Customer's Name = the dynamic value from your trigger at the top of you flow. Make sure you use "contains" as the operator, not "is equal to" in this condition!
In the "If yes" section, you use the Set variable action to set the variable "TeamAlreadyExists" to Yes, if it finds a team where the condition is true.
Now, below all that, once the flow looped through all your teams and channels, you add a new Condition action.
In this Condition action, you check if the variable "TeamAlreadyExists" is still equal to No.
If that's the case (If yes) then you create the Channel using the Create a channel action.
If it is set to Yes, you know that there was a Channel in there somewhere that set the Variable TeamAlreadyExists to Yes and the Channel already exists.
let us know if this works,
cheers
Hey,
I would do it like this: (You have to loop [apply to each] Channels as well, not only Teams...)
Create a string variable (Initialize variable action) called something like "TeamAlreadyExists" and set the value to No.
Then get all Teams with the "List Teams" action.
Then you have to also use the "List Channel" action inside your loop to list all channels inside all Teams.
Inside that loop you then have the Condition action where you check if the Channel Name contains the Customer's Name = the dynamic value from your trigger at the top of you flow. Make sure you use "contains" as the operator, not "is equal to" in this condition!
In the "If yes" section, you use the Set variable action to set the variable "TeamAlreadyExists" to Yes, if it finds a team where the condition is true.
Now, below all that, once the flow looped through all your teams and channels, you add a new Condition action.
In this Condition action, you check if the variable "TeamAlreadyExists" is still equal to No.
If that's the case (If yes) then you create the Channel using the Create a channel action.
If it is set to Yes, you know that there was a Channel in there somewhere that set the Variable TeamAlreadyExists to Yes and the Channel already exists.
let us know if this works,
cheers
User | Count |
---|---|
92 | |
45 | |
21 | |
18 | |
16 |
User | Count |
---|---|
136 | |
49 | |
42 | |
36 | |
28 |