cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TiredOldCoder
Helper I
Helper I

Flow anomaly

This is a little bizarre I hope someone has seen & solved this before.

Flow logic:

1. Trigger on create/update

2. Get all items that have same Project ID which yields:

{
  "value": [
    {
      "@odata.etag": "\"6\"",
      "ItemInternalId": "163",
      "ID": 163,
      "Title": "?",
      "Project": {
        "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
        "Id": 16,
        "Value": "AFRL 711 HPW Sensors"
      },
      "Project#Id": 16,
      "m8sj": "CDO",
      "acuj": 7,
      "mmwk": 2,
      "Modified": DELETED,
      "Created":
DELETED,
      "Author":
DELETED,
      "Author#Claims": "i:0#.f|membership|wwheeler@cdotech.com",
      "Editor":
DELETED ,
     "{Link}":
DELETED,
      "{Name}": "?",
      "{FilenameWithExtension}": "?",
      "{Path}": "Lists/Positions/"
    }
  ]
}

- Initialize some variables to hold counts

- Apply to each

 -- Increment billable (Works)

 -- Increment vacancies (Works)

 -- Test to see if vacancies have posts using 


if(and(greater(items('Apply_to_each')?['Vacant'],
0),
startsWith(coalesce(items('Apply_to_each')?['Job
Posting'
], ''),
'N')),
items('Apply_to_each')?['Vacant'],
0)

 

InvalidTemplate. Unable to process template language expressions in action 'Increment_postings' inputs at line '1' and column '2562': 'The template language function 'greater' expects all of its parameters to be either integer or decimal numbers. Found invalid parameter types: 'Null'.'.

This where my noodle gets fried.   Using the very same field  to increment vacancies, it claims to be Null in the greater() function.

Peripheral question why are the field names different than the list definition:

      "m8sj": "CDO",   --> Company
      "acuj": 7,           --> Billable
      "mmwk": 2,       --> Vacant

All suggestions and sympathy welcome!

v/r,

Bill

1 REPLY 1
TimW
Helper II
Helper II

Maybe just humour it and change

(greater(items('Apply_to_each')?['Vacant'],

to

(greater(coalesce(items('Apply_to_each')?['Vacant'],0),

It could be using type inference and sees that the ? dereference leads to a nullable value. You could also try changing the ? to a . as the dereference operator ... see https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language#operators

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,256)