Updating Edit Record widget to Table Records widget

Updating Edit Record widget to Table Records widget

  
Hello all,

Not a developer by profession so I'm slowly getting my head around the Agile Platform. My question seems easy enough, but I can't quite work out how to do it...

If I have a table record widget showing some data and I would like the Edit Record widget that I have pulled in to show the record I have selected, say by clicking a link on one of the pieces of data being shown. How do I do this? I've tried to refresh the Edit Record widget, but it always shows the first record of the table, and have tried many different source records to no avail. I know it can be done...but what am I missing?

Cheers,

Tom
Hi Tom,

Welcome to the OutSystems community forums, first of all. Indeed, it is easy to get around the Agile Platform, but it does help getting the hang of the basics first.

Did you have a chance of going through our training section or our tutorials in Service Studio?

What you need to do is to pass the Record ID you want to the screen with the Edit Record, so that you can use it in a query to get the right record.

A really quick way to do so is to use IntelliWarp to create the List/Create/Edit pages. See the "How To" videos #5, #6 and #7.

If these don't help you get started, do attach your eSpace in a post, and I'm pretty sure someone will be able to look into it and help you out :)

Regards,

Paulo Tavares
Hi Paulo!

Thank you very much for your reply. I have slowly and diligently been working my way through the training which has been hugely helpful.

What I am trying to do is have the two widgets on the same screen..Imagine a list of names at the top half of the screen and an edit widget at the bottom. I would click on a name in the list and the widget would show that record at the bottom of the screen.

What do you think?

Tom
Hi Tom,

That sounds like a good idea as well.

If that's the case, you'll not only be looking towards refreshing the widget, but also the query that feeds the widget, with a Refresh Query node, and the ID of the record that you want to edit.

If this isn't clear (and it might not be - we're talking about visual models with words :) ), feel free to post your eSpace.

Regards,

Paulo Tavares
Hi Paulo,

Have been trying to achieve what you had recommended for a few days in fact! No luck thought, although I'm sure whatever I'm doing wrong is very simple. I've attached my eSpace as I seem to be going round in circles.

From the home page if you click 'See Calls' under any 'client' the next screen will show all the data for that job...you will also see the Edit widget at the bottom of the screen. What I'm trying to achieve is when you click on a company name on that screen the widget will show the data for that company (as you can see I haven't even started on how to save that info...just trying to work out how to populate it). I've created an action when you click the company name that I was hoping would refresh the query for the source record for the edit widget, than use Ajax to refresh it. Close? Or a long way off?

Hope that makes sense to you.

Really appreciate your help,

Tom
Hi Tom,

Actually, I believe that, more than close, you've got it right. I can't really tell why this isn't working for you. What happens when you click the link? 

Do you have valid job data in the database, so that you know that you're getting the right job data? And the first query - the one for the table - is it getting actual JobData, when you test the query?

If I may ask, are you publishing this in a cloud server, or do you have a public URL? If so, I would love to look at it.

Send it over in a private message if you may, I'm curious about what's going on.

Still, congrats on doing it all - or almost all - on your own - I'm sorry you're feeling like you didn't. Let's dig into it :)

Regards,

Paulo Tavares
Hi Paulo,

I have some live data in there locally. It seems that the first query loads up the data fine, but the second query loads nothing up as the parameter has no value on Preperation, or so I assume. I have test both queries and they work when I add in a test value.

When I click the link there is a small yellow loading icon in the bottom left of the screen, but no record comes up on the Edit Widget, although the Ajax makes the widget flicker so I know it's working to a point.

My trial for the cloud ran out but I can certainly try and sort something out so you can have a look at it.

Thanks for your help, we are getting there!

Tom
Hi Tom,

Well, there's two ways to try and look into it. 

One of them is Debugging the eSpace, and checking what value are you passing to the query as input parameter, when you refresh it. Is it 0, or does it have any valid value?

If so, check the query results as well.

Maybe these will give you some insight into what's going on.

Regards,

Paulo Tavares
Hi Paulo,

Cracked it! Everything was fine in terms of queries, but I had to change the Edit Widget variables for the text boxes etc. to point to the query GetEditJobData where they were originally pointing to JobDataEdit.Record etc..

They seems to have sorted it. Now need to work on saving the data to make sure I haven't just created a dodgy shortcut.

Thanks for all your help, the debugging really helped with this as I never thought to check the Widgets Variables.

Tom
Hi Tom,

Well, that shouldn't be the way to do it, since you're already assigning the query to the Edit Record widget. 

I make no sense of this, sorry. What you had there in the first place should have worked correctly.

I'm glad you sorted it out, for now, but I'm not convinced... Maybe someone has a better insight towards this.

Regards, and good luck with the rest of the app!

Paulo Tavares
any change of showing us the .oml of the working version?