Hello everyone! I have a small issue on my ap...

(Malaka Jayawardene) #1

Hello everyone! I have a small issue on my app that I’m working on. Bear with me as I’m going to explain what it is.

My app is a database app gathering details of patients in our unit. Its parent table is the “Personal Details” table. It has multiple child tables referenced to it. So when the user fills out the personal details of a patient, user gets several referencing virtual columns linked to these child tables, so that the user can fill out the rest of the patient’s details separately (ie: “Clinical Details”, “Blood Investigations”, “Imaging and Biopsy”, “MDT Decisions”, “Diagnosis”, “Management” etc.) and they get saved in different tables inside the main spreadsheet. This is the basic model of my app.

Now to give a background understanding of the problem I’m having…

When the user goes to fill out the “Imaging and Biopsy” table, the user gets a drop down Enumlist from which the user can select any type of imaging. ‘Diagnostic ERCP’ is one such imaging modality. When the user selects ‘Diagnostic ERCP’, the following columns appear - ‘Date of Diagnostic ERCP’, ‘Summary of Diagnostic ERCP’, ‘Post-ERCP Complications’, and a virtual column for the “ERCP Image Upload” child table so that the user can upload several images under ERCP. To get this to work, I have setup a child table called “ERCP Image Upload” that is referenced to the “Imaging and Biopsy” table, so now the parent table is “Imaging and Biopsy” and the child table is “ERCP Image Upload”. Inside the ERCP Image Upload table, I have set up an ‘ERCPKey’ column, an Image type column for uploading the image, and a ref type column called ‘Diagnostic ERCP’, where I have selected “Imaging and Biopsy” as the ReferencedTableName, and I have set up the ‘IsAPartOf’ to “TRUE” so that it creates that referencing virtual column inside the “Imaging and Biopsy” table. Since “Imaging and Biopsy” table is a child table of “Personal Details” parent table, inside the “Imaging and Biopsy” table, I have set up its own key column called ‘InBKey’ and another column called ‘Imaging & Biopsy_Ref’ which is the Ref type column that is referenced to the “Personal Details” table. This is working perfectly for me as intended.

Now to the problem I’m having…

As I told earlier, there are multiple other child tables referenced to the parent table “Personal Details”, and another such child table is “Management” table. Inside this “Management” table, the user gets to select whether the patient is being managed “surgically” or “non-surgically”. So if the user selects “Non-surgical management”, the user gets a virtual column referenced to a child table called “Non-surgical management” (now the parent is “Management” table and the child is “Non-surgical management”). Inside this “Non-surgical management” table, user has many non-surgical options to select, out of which “Therapeutic ERCP” is one option. When the user selects this, the following columns show up - ‘Date of therapeutic ERCP’, ‘Summary of therapeutic ERCP’, ‘Post-ERCP complications’ (pretty much like when the user selects the ‘Diagnostic ERCP’ option from the “Imaging and Biopsy” table earlier). Just like with ‘Diagnostic ERCP’ inside the “Imaging and Biopsy” table, I wanted the user to be able to upload images under this ‘therapeutic ERCP’ as well. Since I have already created an “ERCP Image Upload” table referenced to the “Imaging and Biopsy” table earlier, I thought I should be able to use that same “ERCP Image Upload” table for this as well. So I created a ref type column called ‘Therapeutic ERCP’ inside that “ERCP Image Upload” table and selected the “Non-surgical management” table as the ‘ReferencedTableName’ to it and set ‘IsAPartOf’ to “TRUE” inside that, so that I get an “ERCP Image Upload” virtual column inside the “Non-surgical management” table when the user selects ‘Therapeutic ERCP’. This too worked for me as I wanted!

BUT, since I’m still working on in my app, I’m making many changes to the app elsewhere, and whenever I make some other change to the app absolutely unrelated to what I told above, and everytime I save changes to my app, the “TRUE” in the ‘IsAPartOf’ inside the ‘Therapeutic ERCP’ ref type column gets changed to “FALSE”!! So inside the app, I don’t see the ‘ERCP Image Upload’ virtual column under ‘therapeutic ERCP’. But inside the “Imaging and Biopsy” table, the ‘ERCP Image Upload’ virtual column always appears, because the ‘IsAPartOf’ in ‘Diagnostic ERCP’ ref type column does not change to “FALSE” like it does with ‘Therapeutic ERCP’. So every time before I save changes to the app, I have to head over to the “ERCP Image Upload” table’s columns and REselect “TRUE” for ‘IsAPartOf’ for the ‘Therapeutic ERCP’ Ref type column. Why does this happen?

Sorry for the long read. I wanted you to get an exact idea of the issue that I’m facing, so I had to type in everything.

Happy New Year to all of you at AppSheet!

(Aleksi Alkio) #2

Let’s get this explanation little bit shorter:) You have TableC for images and you want this TableC would be a child table for two different tables, TableA and TableB. Correct?

(Malaka Jayawardene) #3

@Aleksi_Alkio Exactly! :slight_smile: Pardon the long explanation.

(Aleksi Alkio) #4

I was able to reproduce the problem with a test app. I need to talk with our developers if there is a reason for this behavior.

(Malaka Jayawardene) #5

@Aleksi_Alkio Thank you. Hoping to hear a solution :slight_smile:

(Aleksi Alkio) #6

At this moment this behavior is unfortunately by desing. If you like, you could request this from here… www.appsheet.com/feature-requests