hi there, I’ve been working on Corteza for two weeks now, and suddenly I can’t create a record, it shows
Could not create record: check error messages on the form
what is the form it meant ?
hi there, I’ve been working on Corteza for two weeks now, and suddenly I can’t create a record, it shows
Could not create record: check error messages on the form
what is the form it meant ?
and this is from server logs
19:35:45.676 DEBUG actionlog {“timestamp”: “19:35:45.676”, “requestOrigin”: “api/rest”, “requestID”: “7c8c602880a9/E4hn1tlSxh-001146”, “actorIPAddr”: “51.252.118.194”, “actorID”: 269976792540905474, “resource”: “compose:record”, “action”: “create”, “severity”: 0, “error”: “invalid record value input”, “description”: “”, “policy-match”: true, “meta”: {}}
what is the policy-match here?
after many failed tries, I found the issue.
I made a calculated field(F2) that depends on another field(F1) in the same module.
the F1 is filled by a workflow on the BeforCreate trigger.
so the user doesn’t need to fill F1 (it will be filled by the workflow) but when creating the F2 finds F1 null and though the error.
what did I do to solve the issue? I made F2 as a not-calculated field, and create another workflow to fill it on the AfterCreate trigger.
hope this can help someone someday, but what I didn’t like so far about corteza is its error handling and how vague they are.
and btw, I tried using new.F1
in F2 expression but no luck
Hmm… I’ll sync internally to see if the order of what happens for record create/update is as it should be (so are computed fields evaluated before WFs or the other way around).
A few extra notes for you to consider in regards to your solution:
(value_here ?? false) ? do_the_calc : use_default_constant
; so in case the value is not present you use some constant default value, else you calculate it.