cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
notj
Post Prodigy
Post Prodigy

Trigger just stopped working - null values on trigger marked as required in schema?

It was working fine yesterday. Now it seems like it's treating optional fields as required. When trying to launch the flow from my model-driven app, I get this: 

Error: The input body for trigger 'manual' of type 'Request' did not match its schema definition. Error details: 'Invalid type. Expected String but got Null.'.

If I go to the Flow, I get this:

notj_0-1602006558121.png

Clicking Fix The Trigger just shows me a Flow run that failed at the trigger that says: 

BadRequest.

It has my schema there with the fields used throughout the Flow.

One problem I can see is that it has every field I use, even if just in a condition, set as required. These shouldn't be required. In a couple of cases, I'm literally just doing a check to see if the values are null or not.

 

I think this is the issue, but I'm not sure how to resolve it.

 

{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "object",
            "properties": {
              "cr5be_tertiaryfundingperdiem": {
                "title": "Tertiary Funding Per Diem",
                "type": "number",
                "format": "currency"
              },
              "cr5be_secondaryfundingperdiem": {
                "title": "Secondary Funding Per Diem",
                "type": "number",
                "format": "currency"
              },
              "cr5be_primaryfundingperdiem": {
                "title": "Primary Funding Per Diem",
                "type": "number",
                "format": "currency"
              },
              "cr5be_educationfundingperdiem": {
                "title": "Education Funding Per Diem",
                "type": "number",
                "format": "currency"
              },
              "cr5be_primaryfundingperdiem_base": {
                "title": "Primary Funding Per Diem (Base)",
                "type": "number",
                "format": "currency"
              },
              "cr5be_tertiaryfundingstartdate": {
                "title": "Tertiary Funding Start Date",
                "type": "string",
                "format": "date-time"
              },
              "cr5be_tertiaryfundingenddate": {
                "title": "Tertiary Funding End Date",
                "type": "string",
                "format": "date-time"
              },
              "cr5be_secondaryfundingenddate": {
                "title": "Secondary Funding End Date",
                "type": "string",
                "format": "date-time"
              },
              "cr5be_primaryfundingenddate": {
                "title": "Primary Funding End Date",
                "type": "string",
                "format": "date-time"
              },
              "cr5be_secondaryfundingstartdate": {
                "title": "Secondary Funding Start Date",
                "type": "string",
                "format": "date-time"
              },
              "cr5be_primaryfundingstartdate": {
                "title": "Primary Funding Start Date",
                "type": "string",
                "format": "date-time"
              },
              "cr5be_martareferralid": {
                "title": "Referral",
                "type": "string",
                "format": "guid"
              }
            },
            "required": [
              "cr5be_tertiaryfundingperdiem",
              "cr5be_secondaryfundingperdiem",
              "cr5be_primaryfundingperdiem",
              "cr5be_educationfundingperdiem",
              "cr5be_primaryfundingperdiem_base",
              "cr5be_tertiaryfundingstartdate",
              "cr5be_tertiaryfundingenddate",
              "cr5be_secondaryfundingenddate",
              "cr5be_primaryfundingenddate",
              "cr5be_secondaryfundingstartdate",
              "cr5be_primaryfundingstartdate",
              "cr5be_martareferralid"
            ]
          }
        },
        "required": [
          "entity"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}

 

1 ACCEPTED SOLUTION

Accepted Solutions
notj
Post Prodigy
Post Prodigy

Still not working 😞

 

I'm tired of fighting with this trigger. I decided to do something different. I just added a Yes/No to the app, and when switched to Yes it triggers the flow and works fine.

View solution in original post

19 REPLIES 19
notj
Post Prodigy
Post Prodigy

I'm fairly positive it has something to do with those values being marked as required, because if I fill in every value the trigger will actually work. The Flow breaks elsewhere, but that will at least make the trigger fire.

 

 

notj
Post Prodigy
Post Prodigy

Anyone have any ideas?

v-litu-msft
Community Support
Community Support

Hi @notj,

 

Could you please share a screenshot of your trigger output? How does it display?

And please share how you configure the Compose 2 action, how about try to input following expression into the Compose 2:

STart: @triggerBody()?['entity']?['cr5be_primaryfundingstartdate']
End: @triggerBody()?['entity']?['cr5be_primaryfundingenddate']

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-litu-msft You just want a picture of the trigger?

 

notj_0-1602159491636.png

 

 

Here's the compose:

notj_1-1602159550662.png

 

 

 

I'm not sure how these are useful though.

v-litu-msft
Community Support
Community Support

Hi @notj,

 

Thanks for your screenshot, I mean the output of the trigger, just like this:

Screenshot 2020-10-09 170937.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@v-litu-msft Oh, I already did. It's in the original post.

 

Here's the error I get when in the app:

Something went wrong. Please refresh the page or try again after some time.

Please try again in a few minutes or refresh the page now.

 

If you contact support, you may be asked to provide the following details:

Time:
Server/Client Correlation ID: 56c8aba7-f2e8-440b-9c48-b75d7bcc030e
x-ms-client-request-id (Client->Backend Request Header): 3e4d3375-a1fc-45fc-a329-3a58-287c64b0
Error: The input body for trigger 'manual' of type 'Request' did not match its schema definition. Error details: 'Invalid type. Expected String but got Null.,Invalid type. Expected Number but got Null.,Invalid type. Expected Number but got Null.,Invalid type. Expected String but got Null.'.
 
 
Here's the trigger(the full text in the schema is already in the first post):
 
2020-10-09 07_49_51-Power Apps and 7 more pages - [InPrivate] - Microsoft​ Edge.png
 
Like I said in the first post, the fields it's marking as required are just evaluated in conditions to see IF they have data. They should not be required. 
v-litu-msft
Community Support
Community Support

Hi @notj,

 

Ok, so the trigger only returns schema not return value, and it could work in previous run.

You could go to support to open a ticket to ask for further help:

Screenshot 2020-10-12 164800.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-litu-msft 

The trigger DOES work, but ONLY if I have every single field filled in that's used in the flow. If any of the fields are blank then the trigger fails.

notj
Post Prodigy
Post Prodigy

@v-litu-msft Hi there, any ideas on this? The trigger DOES work but only if every field is filled in. The fields I'm using IN the Flow are marked as required in the schema but they should not be required.

Hello @notj 

 

The required fields are the fields from CDS entity. You will have to change the fields in the entity to not be required.

https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/create-edit-field-portal#genera...


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





notj
Post Prodigy
Post Prodigy

@Jcook that's would be a problem. Those fields are not required on the entity. 

notj_0-1603302549927.pngnotj_1-1603302565472.pngnotj_2-1603302581155.png

 

Hi @notj 

 

Can you try removing the trigger, and re adding.

 

Can you give me the Code for the trigger (Peek code):

On your trigger click the 3 dots, and click Peek Code.

Jcook_0-1603305484152.png

 

Copy and paste here, the JSON please.


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





notj
Post Prodigy
Post Prodigy

@Jcook 

Sure, here's what I got.

 

 

{
    "kind": "ApiConnection",
    "splitOn": "@triggerBody()['rows']",
    "inputs": {
        "schema": {
            "type": "object",
            "properties": {
                "rows": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "entity": {
                                "type": "object",
                                "properties": {
                                    "cr5be_martareferralid": {
                                        "title": "Referral",
                                        "type": "string",
                                        "format": "guid"
                                    },
                                    "cr5be_primaryfundingenddate": {
                                        "title": "Primary Funding End Date",
                                        "type": "string",
                                        "format": "date-time"
                                    },
                                    "cr5be_educationfundingperdiem": {
                                        "title": "Education Funding Per Diem",
                                        "type": "number",
                                        "format": "currency"
                                    },
                                    "cr5be_primaryfundingperdiem": {
                                        "title": "Primary Funding Per Diem",
                                        "type": "number",
                                        "format": "currency"
                                    },
                                    "cr5be_secondaryfundingperdiem": {
                                        "title": "Secondary Funding Per Diem",
                                        "type": "number",
                                        "format": "currency"
                                    },
                                    "cr5be_secondaryfundingenddate": {
                                        "title": "Secondary Funding End Date",
                                        "type": "string",
                                        "format": "date-time"
                                    },
                                    "cr5be_tertiaryfundingperdiem": {
                                        "title": "Tertiary Funding Per Diem",
                                        "type": "number",
                                        "format": "currency"
                                    },
                                    "cr5be_tertiaryfundingenddate": {
                                        "title": "Tertiary Funding End Date",
                                        "type": "string",
                                        "format": "date-time"
                                    },
                                    "cr5be_primaryfundingstartdate": {
                                        "title": "Primary Funding Start Date",
                                        "type": "string",
                                        "format": "date-time"
                                    },
                                    "cr5be_secondaryfundingstartdate": {
                                        "title": "Secondary Funding Start Date",
                                        "type": "string",
                                        "format": "date-time"
                                    }
                                },
                                "required": [
                                    "cr5be_martareferralid",
                                    "cr5be_primaryfundingenddate",
                                    "cr5be_educationfundingperdiem",
                                    "cr5be_primaryfundingperdiem",
                                    "cr5be_secondaryfundingperdiem",
                                    "cr5be_secondaryfundingenddate",
                                    "cr5be_tertiaryfundingperdiem",
                                    "cr5be_tertiaryfundingenddate",
                                    "cr5be_primaryfundingstartdate",
                                    "cr5be_secondaryfundingstartdate"
                                ]
                            }
                        },
                        "required": [
                            "entity"
                        ]
                    }
                }
            },
            "required": [
                "rows"
            ]
        },
        "host": {
            "connection": {
                "name": "@parameters('$connections')['shared_commondataservice']['connectionId']"
            }
        },
        "operationId": "GetOnNewItems_V2",
        "parameters": {
            "dataset": "default.cds",
            "table": "cr5be_martareferrals"
        }
    }
}

 

Hi @notj 

 

Can you send screenshot of your trigger expanded, so I can see what the inputs etc. are being passed in.

 

Have you tried removing the trigger than re adding back? 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





notj
Post Prodigy
Post Prodigy

There's nothing to the trigger. It's just a manual flow from a model-driven app.

 

notj_0-1603310934979.png

 

I have not deleted the trigger because I really don't want to rebuild the entire flow and reselect every value all over the place.

Hi @notj 

 

It looks like the schema is getting cached from previous versions. To verify this is the case, we could do the following,

 

Create a new flow, with the same Trigger on the same entity, and trigger the Flow to confirm the Flow can run successful.

If the Flow runs as expected - we can confirm there is caching of the schema.

Proceed to Step 2

 

If the Flow fails just like the main Flow fails:

I would suggest to open a ticket with Microsoft as this may be an backend API issue https://flow.microsoft.com/en-us/support/

Step 2

Back to the main Flow, to attempt to remove the caching of the schema, export the Flow (Just the Flow) And Re import 'As New' than try and trigger the newly imported flow from your App.

If your Flow fails - Than unfortunately, the only option would be to either remove the trigger, or re create the Flow.

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





notj
Post Prodigy
Post Prodigy

@Jcook I'm not sure if this is the same as what you're suggesting in step 2, but I've saved the flow as a copy and tried with that. It's the same issues.

 

I've also deleted the trigger and started with a new one and the issue still stands.

Hi @notj 

 

Try using the export feature:

Jcook_0-1603914624318.png

 

Than re-import, but make sure you select 'Create as New' when doing the import

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





notj
Post Prodigy
Post Prodigy

Still not working 😞

 

I'm tired of fighting with this trigger. I decided to do something different. I just added a Yes/No to the app, and when switched to Yes it triggers the flow and works fine.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,585)