I have a question about if and how it may be ...

(alan singer) #1

I have a question about if and how it may be possible to generate TWO records to be written from ONE data entry transaction.

I want to create a table that shows the relationships between two people.

I already have a table set up that has a row for each person with their name, DOB, phone number etc.

The process to enter relationships between people will be as follows;

The user will be presented with a screen and will pick a person’s name om a dropdown (Linked to the person table)(say MARY).

The user will then advance to the next field and choose relationship (eg WIFE) and then advance to the next field and choose a second person’s name (eg JOHN) and then advanc to the next field and pick a relationship HUSBAND.

When the user presses SAVE for that entry, I want two rows

to be written and contain the following fields

id, id MARY, WIFE, id JOHN id, idJOHN, HUSBAND, id MARY

Having such a table I can choose any person’s name and get a list of all their relationships

CAn anyone help suggest a way I can do this without having to require the user to enter two separate screen entries?

(Levent KULAÇOĞLU) #2

@alan_singer this can only be achieved with Google Apps Scripting right at the moment. But I believe AppSheet techs are working on a add new row action but not sure when it comes into the scene

(Levent KULAÇOĞLU) #3

@alan_singer it’s there but not sure if it’s working as expected or if it’s still under construction

(alan singer) #4

Thanks @Levent_KULACOGLU

i will give it a try!!

(Levent KULAÇOĞLU) #5

@alan_singer I have checked that it’s not ready for using yet

(alan singer) #6

@Levent_KULACOGLU Thanks again for your answers and help - much appreciated!

I was wanting to know more about Google Apps scripting - The data I am using in this app is in a MYSQL database - is Google App scripting still relevant or is it possible that a stored procedure could be used to achieve my objective?

(Levent KULAÇOĞLU) #7

@alan_singer for sure you can connect to any external source with Google Apps Script other than Google Spreadsheet.

(alan singer) #8

@Levent_KULACOGLU Ok - So does that mean, there is no way in app sheet to generate more than a single row insert, update or delete per “Submit”?

(Levent KULAÇOĞLU) #9

@alan_singer right at the moment we don’t have that feature. But as I have posted earlier, there is “something” which may be similar to your query in AppSheet’s development pipeline. Hoewever, I cannot mention about any timeline for that. Therefore, it’s only achievable thru Google Apps Scripting right at the moment

(alan singer) #10

@Levent_KULACOGLU I think that feature will be a real game changer for app sheet

(Levent KULAÇOĞLU) #11

@alan_singer I have realized in my earlier reply that I have unintentionally written that you CANNOT connect to an external source with Google Apps Script other than Google Spreadsheet. That’s not correct. You CAN connect to any external resource with Google Apps Script including the HTTP based resources serving publicized RESTful API. FYI.