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:
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"
]
}
Solved! Go to Solution.
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.
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.
Anyone have any ideas?
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?
Here's the compose:
I'm not sure how these are useful though.
Hi @notj,
Thanks for your screenshot, I mean the output of the trigger, just like this:
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:
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:
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:
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.
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.
@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.
Proud to be a Flownaut!
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.
Copy and paste here, the JSON please.
Proud to be a Flownaut!
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?
Proud to be a Flownaut!
There's nothing to the trigger. It's just a manual flow from a model-driven app.
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/
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.
Proud to be a Flownaut!
@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:
Than re-import, but make sure you select 'Create as New' when doing the import
Proud to be a Flownaut!
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.
User | Count |
---|---|
89 | |
41 | |
22 | |
20 | |
16 |
User | Count |
---|---|
130 | |
51 | |
48 | |
36 | |
26 |