I’m currently building a page that pulls and displays unique data from a patient table based on a specific objectId. This part is working correctly — I can retrieve and show all the relevant patient-level fields. Logic below:
I am using the ‘collapsible panel’ component off the UI marketplace and was successful in displaying the data from the ‘patient’ and the linked table. Logic below:
I have a collapsible panel component that is housing multiple checkboxes to a 1:1 related table with the relation link called ‘condition_disease_link’. Was hoping to get some help understanding the correct way to upsert the changes to the linked 1:1 relation table. More specially for multiple checkboxes.
Welcome to our community and thank you for trying out Backendless.
We will be happy to assist you. I need to ask you a few more questions so I can understand the problem better.
Please provide your Application ID, container name, and page name.
Do you want to make changes every time a checkbox is selected? It’s better to use one general Save button, collect all checkbox values at once, and create or update the entire object.
Yes we would like the use an ‘edit’ & ‘save’ button to collect and write all changes to the respective table if possible. If you look at our page, there are multiple sections that will require an ‘edit’ & ‘save’ button each. Early stages of this feature is on the top right corner of the page where it should enable and disable the input fields.
The containers mentioned above are pulling data from different tables, ‘condition_disease’ and ‘patient_schedule’ respectively. While on the page level and rest of the fields are pulling data from the ‘patient’ table.
where, for your app, the following names will be:
Variables: parentObject, childObjectId Parent = patient Method Argument "objectId" = id from panelContent Data Model rel = condition_disease_link Method Argument "option1" = value for hypertension
… Method Argument "optionN" = value for coronary_artery_disease
The above applies to the case where the child record for condition_disease_link can be either present or absent (so far, since your tables are populated, I assume this is your case).
However, if we guarantee that for every record in the patient table, there is a corresponding record in the condition_disease table, then the logic becomes simpler.