Add a row then display edit screen for data in that row?

Hi

Here is an AI tour guide generator.

I have an input sheet that takes data from the user such as starting location, the length of tour they want to do. Here’s what I want to do next:

  1. Get GPT to provide attractions for the itinerary. (I’ve done this through Google app script)
  2. Display a list of attractions for users to amend or approve. (I can’t seem to do this with seamlessly. Currently it is only displaying “this item” value rather than the current edited row.
  3. Allow a user to preview tour itenerary before purchasing the full tour. (Not got there yet!)

This is the issue I currently have:
image

GPT Prompt is inspired by Recommendation engine with Glide's OpenAI Integration and Enhancing User Experience with OpenAI and JSON Magic @Trustin @grumo

1 Like

First thing are you using Glide Table or Google Sheet for data?
From the Create a Tour page, when you click Create My Tour > It will Add a row to the Tour Data.
Can I find out what is the purpose for Set column values?
From the User interaction you are not prompting ChatGPT right?

I am guessing you should redirect to show a new screen, and display the items in a collection?

Google Sheets.
The set column values is set to “Clear value” for this item so that it’s not pre-populated for the next person.
I am using Google Sheets to do the prompting and not via Glide (I initially thought it was easier!)

Yes I think you are right. But how do you display just this new row for the user? I suppose I’d need to add a Single Value Column in the users tab to select the last row in the Tours table, and then use a relation to grab all the values of this Tour…

Before you add the new row, set the USC column in the current table with a Unique identifier value… then when adding a new row, add this value to it… set the relation between these two… open a new screen from that relation.

1 Like

Thank you for your response!

I am not sure I fully understand your steps or if this is what you meant: I ended up adding a Relations & Lookup of all the Tours of a particular user in the Users Table, and in that same table, Get the Tour ID of the last row. Then, created a new screen with a collection that is filtered by that Tour ID.

Seems to be working at the moment.

2 Likes

If you do the relation to the last row, it might not work if someone else adds another row simultaneously… it will not be the last row anymore… that’s why I suggested adding a unique ID to point precisely to that row.

1 Like

Think I understand now. Thank you!