15
Views
7
Comments
Connect a list post (user)  from aList screen to anExpression inAUser page screen?
Question
Application Type
Reactive
Service Studio Version
11.54.8 (Build 62344)

From this row in this screen, by GoTo button:

To this screen, where "name" is expression equivalet to the row I pressed Go To

   

I think the answer its about using the right input parameter and format the expression right. But I don't succeed.  

Thanks in advance.

/D

Nubie,non proficient in coding

2023-04-06 11-24-23
Paulo Zacarias

Hi Daniel, 

Did you take a look at the built-in templates?

If you create screens using these templates you can learn how some patterns are built in OutSystems. 

Nonetheless, from your question, it seems you are looking for a ListScreen/DetailScreen pattern where you navigate from the list to the detail screen and see the user information in this detail screen. 

Attached is a .oml where you can see how you can implement this.

Since you are starting with OutSystems now, I would recommend you study the documentation and train your skills through the training paths:

https://www.outsystems.com/training/paths/

I hope this helps, Happy coding!

Regards, 

PZ


Forum.oml
UserImage.jpg
Daniel G

hank you #Paulo Zacarias for you response.

I working my way through the all training. But so far the templates overloads me with information.

Also looked at the oml-file.  All in all, I have manage to connect and two screens. But what has happened is that it always the fetch the first name in the list and that one gets trasferred, not the name from the list row I clicked on. 

UserImage.jpg
Daniel G

Thank you #Paulo Zacarias for you response.

I working my way through the all training. But so far the templates overloads me with information.

Also looked at the oml-file.  All in all, I have manage to connect and two screens. But what has happened is that it always the fetch the first name in the list and that one gets trasferred, not the name from the list row I clicked on. 

UserImage.jpg
Greg Adams

You could post the expression you are using to get the name.

My guess is that if you go back to the expression and replace what you have as the name with something like

listName.current.name

it will deliver the right name


(In the dialog box the various options are listed and you can explore what is available)

UserImage.jpg
Daniel G
2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi @Daniel G ,

typical approach would be

  • add not the name, but only the id of a user as input variable to UserProfile
  • have an aggregate in UserProfile that fetches the user with filter on that id parameter
  • in your expression, you can then have GetUserById.Current.Name
  • whenever you want to show the profile of a user, flow to that screen and pass the correct id

now, you say it's always the first user, so maybe you are doing something wrong in knowing which user to pass 

  • in your list screen you have a list or table of users
  • in there you have a link (or button) to flow to the UserProfile
  • if it is a link or button
    • choose the UserProfile screen as On Click property
    • below that, it will open up space to choose what value you want to pass to the inputs
    • choose here to use GetUsers.List.Current.User.Id
  • if it is not a link or button (on click event of some sort), then it is not that simple, come back for more if that is the case

one newbie tip : if you feel overwhelmed by the templates, maybe start with just scaffolding a single list and detail page (i.e. drag some entity to the canvas of some UI flow) and study what is going on in there, that is just 2 screens and some actions, it should not overwhelm you.  You will see there this same pattern of how the list goes to the detail.

Dorine

UserImage.jpg
Daniel G

Thanks Dorine, I think I have done everything you said, but it still does't work.

On the sendig link I have;  GetVictims.List.Current.Victim.Id
 (it's going to be a victim database, not users)

On the receiving form I have:  GetVictimById.List.Current.Victim.Name

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.