Hello!
I am using a wizard to split my form into several sections. The structure of every section is like this. Some contents and a form. In total there are 8 forms that should be linked to one entity "Case" with around 25 attributes. (In Form 1 you can enter attributes 1-5, in Form 2 attributes 6-9 and so on). Splitting the entity with this method is working perfectly fine. I can record my inputs.
Tied to the entity "Case" is the entity "Demand" as one-to-many relationship (see ERM).
Here is where the problem starts. On the dedicated page "demands and targets" the users should be able to add as many demands as they would like. I can add them, but they are not connected to the case by the CaseId (input variable of the screen). I believe there is an error with the button at each form that saves the records to the entity case and automatically navigates to the next section. When separating the button form say Form 1, the error message "Expected Form: Is Form Default property will only have effect on Buttons inside Forms." appears. When adding a new case the demand table always shows all records without using the filter "Demand.CaseId = CaseId".
Please check the OML for better understanding.
Check: I used only one form to enter the attributes for case AND the demands. With this method, the demands and tied properly to the CaseId.
How can I fix this error and make sure, that the demands are tied properly to the entity case?
Thank you for your help!
(Another problem by using buttons on every form is that all the time i click the button a new row is being created)
Hello Anton, You are using CaseCreateOrUpdate but you are not using the returned caseId, and this is causing 2 issues:
1- each time you use CaseCreateOrUpdate it created a new record.
2- not using the CaseId i demand will cerate it as orphane.
to for this this:
1- add assign after the CaseCreateOrUpdate to assign returned id to the GetCaseById.List.Current.Case.Id.
2- assign GetDemandById.List.Current.Demand.CaseId with the value of GetCaseById.List.Current.Case.Id before CreateOrUpdateDemand.
Good luck,
Omar