19
Views
9
Comments
Dropdown save issue with custom StaticUser table
Application Type
Reactive

Hi, I need help making hobby selection/save dynamic per user using my own StaticUser table (not OutSystems Users / GetUserId).

Problem

  • Using a multi-select dropdown for hobbies (SelectedOptionList)

  • SaveOnClick is not working → data not getting saved

  • Data shows for all users instead of only the logged-in static user

I want each static user, when logged in, to only see and save their own hobbies.

DropDownTag.oml
2016-04-22 00-29-45
Nuno Reis
 
MVP

Hello.


First, don't do this.

You are deleting one by one on the client side. You should send a single request to server side and do a truncate on the table.


Second, to save you need data. Empty attributes create empty records.

How are you defining which user get which hobby? That is not on the screen.

And it should also be done as a single call to the server.

UserImage.jpg
Ashwin Kolhe

I tried your suggestion, but it’s still not working for me. I’m not sure how to properly define which user gets which hobby when using my custom StaticUser table. Right now the SaveOnClick is creating empty records or showing data across users.

Could you please guide me on how to pass the selected dropdown values along with the correct StaticUserId to the server in a single call?


I also want that when a user refreshes the page, their saved hobbies should automatically load into the dropdown. The dropdown should always show the user’s current selections, so they can check/uncheck or add/remove hobbies anytime. 


DropDownTag.oml
2016-04-22 00-29-45
Nuno Reis
 
MVP

I fixed the Delete and Save/Refresh is working.

But every time you save it deletes again... You need to clarify what you want.

DropDownTag.oml
UserImage.jpg
Ashwin Kolhe

What I want is:

  • When a user selects hobbies from the dropdown, those selections should be saved and also displayed in the table below.

  • The next time the same user comes back (or refreshes), the dropdown should already show only that user’s saved hobbies as the initial/starting selections.

  • Right now, I’m using a variable (Var1) for this, but it causes an issue: other users opening the screen through the link can also see my saved data.

  • I only want each user to see their own saved data, so they can check/uncheck or change their hobbies independently.

  • Also, if the user removes a hobby from the dropdown (using the cross ✖️) and saves, the table should update too. After that, even if the user refreshes the page, the dropdown should still show the updated saved hobbies automatically (without needing to click the dropdown).

(See images attached)


DropDownTag1.oml
2016-04-22 00-29-45
Nuno Reis
 
MVP

So you don't need to delete.

What you need is to filter by logged user, but before you have a static user entity instead of the usual User entity. You don't know who is logged in. Why do you want the StaticUser to be like that?

UserImage.jpg
Ashwin Kolhe


Yes, you’re right I’m using StaticUser only for testing purposes right now, instead of the built-in User entity.

Can you please show me how this filtering and saving should be done in an OML example (even a simple one)? That would really help me understand the correct approach. 

2016-04-22 00-29-45
Nuno Reis
 
MVP

Here is a simple version with the real User table.

Didn't do the security part, just some save/delete logic.

DropDownTag.oml
UserImage.jpg
Ashwin Kolhe

Hi,

I want to build something like this in my OML, but right now I’m only able to save up to 2 roles. Here’s what I need:


  • In the table screen, there should be two columns → Name and Role.
  • Under Role, I want to display all the selected roles as a comma-separated list.
  • The DropdownTags OnChange behavior is confusing.



Additional details:


  • I want to use static entities.
  • There are three tables:
    1. Hobby → static entity
    2. StaticUser → static entity
    3. HobbyUserRelationship → regular entity linking users and hobbies/roles



The goal is that the user can select multiple hobbies and save them properly in the relationship table.



TAGS.oml
2025-09-25 14-38-22
Lokesh Kumar Yadav

if you got the solution please mark as solution 

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