cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Evaluate a condition based on a Trello label value

I am trying to create a condition in a flow that directs the flow based on the value of a label on a Trello card, but can't seem to get the condition logic correct. Any suggestions?

 

I have used 'Get a card by id' to get the card details and I know both the color and name of the label I want to match, but cannot work out which field(s) on the returned card to check and how to format the logic expression.

5 REPLIES 5
Highlighted

Re: Evaluate a condition based on a Trello label value

Can you publish a screenshot of the flow and a screenshot of the flow run history that you have got so far?

Highlighted
Anonymous
Not applicable

Re: Evaluate a condition based on a Trello label value

Hi - this is the current flow and conditional expression. The last run failed at calculating the condition because of the data types I'm using, with the error:

InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '2465': 'The template language expression 'equals(items('Apply_to_each_4')['Label_color'], 'yellow')' cannot be evaluated because property 'Label_color' cannot be selected. Property selection is not supported on values of type 'String'. Please see https://aka.ms/logicexpressions for usage details.'.

 

I want the condition to evaluate "Does the card have a yellow label?", or "Does the card have the 'Do Work' label?"; I know both the color and name of the label I want to check, just not how to format the expression.

 

 

Flow.JPG

Highlighted

Re: Evaluate a condition based on a Trello label value

I think I saw a similar problem earlier today.

 

I think that the Apply to each fro is giving an array back. 

 

Can you put a compose action inside the Appl to each 4 and cp[y the "Cards in List..." inot that compose. Then see what the json looks like in the run history. If it starts with [ and ends with ] then you are lloking at an array and you will need to either add another apply to each or se3lect the first item (if there is only one) with [0]

 

 

 

 

Highlighted

Re: Evaluate a condition based on a Trello label value

I just completed a post on this nested array issue.

 

https://veenstra.me.uk/2018/11/13/microsoft-flow-single-item-nested-arrays/

Highlighted
Anonymous
Not applicable

Re: Evaluate a condition based on a Trello label value

The output is not an array, it is just the Label id in string format. 

 

I have the array of all labels available from 'List labels of a board', which provides the Label ids as well as colors and names of each label used in the board. What I don't know how to write is an expression that finds the label id from a name or color. I could then match it to the label id from the card. 

 

I can probbaly work it out from this expression, which I suspect is reasonably simple, I just don't know the syntax of forming these expressions. Otherwise I'll just do it manumatically, but thanks for the help so far.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,378)