Save and update 2 table

Danish ver.
Glide er et super værktøj til at lave app. og rimelig nemt, dog med de banale funktioner, men her er så jeg måske ikke forstår nogen ting og måske er det fordi det ikke kan lade sig gøre. og jeg ved godt jeg ikke kan samligne asp kodening med app kodening, men i asp kodening der kunne man i en formular oprette til eks. opret tilbud, når man klikker gem så vil man kunne med en lille stump kode gøre at den oprettet tilbuddet, men den updatere også tabellen med opgaven tilbudstatus til " tilbud oprettet "
så man både oprettet tilbuddet i tabellen " tilbud " og man updatere i tabellen " opgave" kunlonnens “tilbudstatus” kan det virkelig passe at man ikke kan det ?
Jeg kæmper med det og jeg har endnu ikke fundet løsningen og jeg har prøvet at kigge på : Relation, lookup, if then else - og andre. og det kan godt være jeg er dum, men jeg ved ikke hvor jeg snart skal kigge eller gøre, nogen der kan guide mig i en eller anden retning?

English Ver.
Glide is a great tool for creating apps, and fairly easy to use, albeit with its basic functions. However, there are some things I might not understand, and perhaps it’s because it’s not feasible. I know I can’t compare ASP coding to app coding, but in ASP coding, you could, for example, create an offer in a form. When you click save, with just a small piece of code, it would create the offer, but it would also update the table with the task’s offer status to ‘offer created’. So, you’d both create the offer in the ‘offer’ table and update the ‘task’ table’s column ‘offer status’. Can it really be that you can’t do this? I’m struggling with it, and I haven’t found the solution yet. I’ve tried looking at relations, lookup, if-then-else, and others. It might be that I’m not smart, but I don’t know where to look or what to do next. Can anyone guide me in some direction?

Yes, you can do this using Column Values in your Form. Have a read of the below:

No, that’s not what it does. It only fetches information from what you’re currently reading and saves it in the database you create the offer in. It should save in the offer table and then update a field in the table where what you’re reading is.

Ah sorry, I misunderstood.

So in that case you should be able to get what you want using an onSubmit action action with the form. It’s a little but tricky, because when the form is submitted the screen switches context to the table where the row is being added to, so you won’t have direct access to the source table. However, there are ways around this. Have a watch of the below video - I think it might help you with this.

dansk ver.
ja det er nok det jeg søgte, men det godt nok meget besværligt måde at gøre det på. Og så skal ens app være publish før man kan, må indrømme det er noget tungt at skulle gøre det på den måde, når jeg tænker det er en ret simpel funktion i de fleste programmerings sprog, kan godt være det ikke er simpel i app kodeninge, men jeg mener man kan når man koder sin app, for jeg har kigget på at lave app hvor man koder selv, men opgav fordi det kræver meget mere tid at lære. kan det virkelig passe at der ikke kan laves en funktion som kunne gøre det nemmere.? det burde vel kunne lade sige gøre lave en form der kan " Gemme i tabel" 1 " og så gør den det den skal i den tabel “1” og når det er udført så laver jeg lige en " Update i tabel " 2" og - then end. jeg ved man kan i app. men det er måske nok der hvor man skal kode selv eller kan tilføje kode til sine apps. men jeg tænker bare med alt det man kan i GLide så tænker jeg at så kan man vel lave en form som kan det. " lige som man har " if then else. det kunne man overføre i en form. hvor man kan som bruger vælge om man også vil lave en update i en anden tabel eller kulonne. jeg kan godt mærke at den funktion ikke findes gør jeg er i tvivl om jeg kan lave mine app her. det er delme en skam, for syntes sgu ellers det har det bedste måde at lave app uden code. men jeg ved også at den funktion er en som mine app vil blive bygget op omkring den måde. ØvØV - det skal ikke tages som negativ kritik eller på anden vis. jeg er bare ked af at det ikke er en mulighed. Men tak for du igen giver svar :smiley:
eller er det helt skudt den måde jeg tænker på.

English ver.
Yeah, that’s probably what I was looking for, but it’s quite cumbersome to do it that way. And then your app has to be published before you can, I must admit it’s quite heavy to do it that way, considering it’s a pretty simple function in most programming languages. It might not be simple in app coding, but I believe you can do it when coding your app, as I’ve looked into creating apps where you code yourself, but gave up because it requires much more time to learn. Can it really be that there’s no way to create a function that could make it easier? It should be possible to create a form that can ‘Save to table 1’ and then it does what it needs to in table 1, and when that’s done, I’ll just do an ‘Update in table 2’ and - then end. I know you can do it in apps, but maybe that’s where you have to code yourself or add code to your apps. But with all the things you can do in Glide, I think you could create a form that does it. Just like you have ‘if then else’, you could transfer that into a form, where as a user, you can choose whether you also want to do an update in another table or column. I can feel that the function doesn’t exist, which makes me doubt whether I can make my apps here. It’s really a shame, because I think it’s the best way to create apps without code. But I also know that function is one around which my apps will be built. Bummer - this shouldn’t be taken as negative criticism or anything. I’m just disappointed that it’s not an option. But thanks for providing answers again! :smiley: Or am I completely off with the way I’m thinking?"

A solution for your use case probably doesn’t need to be as elaborate as the example in Bob’s video, but you can still use the approach of using your User Profile row as a temporary “storage” area. The thing to understand is that the User Profile row is special, in that you can get or set values in that row from anywhere in your App.

So, in your case all you really need to do is set a reference to your current row (ie. the RowID) in your User Profile as the Form is opened, then use that value to build a Single Relation back to your source table. Then in the onSubmit action, you can Set a Value in that table via the Single Relation in your User Profile row.

Dansk ver.
ja, men det kan da aldrig blive en midlertidigt lagring, da den funktion vil blive brugt i appen, så skal den vel også lægge der som permanent.
Ja så man bruger faktisk sin bruger database sin en slags session opbevaring, men dog hvor dataerne ikke bliver slettet. Det virker lidt oldschool i min verden. er der heller ikke i app udvikling noget der hedder Dictionary Object for The Dictionary object is used to store information in name/value pairs (referred to as key and item). The Dictionary object might seem similar to Arrays, however, the Dictionary object is a more desirable solution to manipulate related data.
jeg ved ikke hvad jeg skal tænke eller gør omkring den håndtering. det frustrere mig sgu lidt. men er det ikke muligt at lave overhoved i app eller er det bare fordi Glide ikke tilbyder det.

English ver.
Yeah, but it can’t really be a temporary storage, as that function will be used in the app, so it should also be there permanently.
So, in fact, you’re using your user database as a sort of session storage, but where the data isn’t deleted. It seems a bit old-school to me. Isn’t there something in app development called a Dictionary Object? The Dictionary object is used to store information in name/value pairs (referred to as key and item). The Dictionary object might seem similar to Arrays, however, the Dictionary object is a more desirable solution to manipulate related data.
I don’t know what to think or do about this handling. It’s frustrating me a bit. But is it not possible to do at all in the app, or is it just because Glide doesn’t offer it?

You can get what you want, you just need to do it in a different way that you would if you were writing code. Glide is a low code platform, so some things might seem a bit cumbersome if you’re coming from a traditional development background. But some (many) things are much, much easier. So I think it’s a nett win overall.

Key/value pairs can be used in Glide with the family of JSON columns.

Dansk ver.
tak igen for dit svar, og det er selvfølgelig ikke din skyld det er så besværligt. men jeg skal ærlig sige at jeg ikke gider at gøre så meget for sådan en lille funktion som i min verden burde ikke kræve så meget. men det er nok fordi jeg ikke kender det til app kodning. jeg skal lige tænke boks og overveje hvad jeg gør eller ikke gør. om jeg skal finde en hel anden løsning.

english ver.
Thanks again for your response, and of course, it’s not your fault it’s so cumbersome. But I have to be honest and say that I don’t feel like putting in so much effort for such a small function that, in my opinion, shouldn’t require so much. But that’s probably because I’m not familiar with app coding. I need to think outside the box and consider what I do or don’t do, whether I should find a completely different solution.

I just thought, could it possibly be done on a screen displaying information to pull from 2 tables? That might solve my problem. Because all I need to do is show the user on their view screen that an offer has been created