20
Views
6
Comments
Save software list as single attribuite

Hello, im new to outsystems im currently working in ODC studio on a simple app to save user information.


My issue is that i want a attribuite which would save a list of software as shown in the example below. Since i will be using a large ammount of softwares im trying to avoid making individual attrubuites for them, and whilst creating the user i have a list which i want can select and and save it to the attribute





Hi Ignacy,

just a tip upfront : this is a data modeling question rather than an Outsystems question, so you could Google it to get a lot of information about how to do this.

I would say, you have a many to many realtionship between a person and a piece of software.  This would typically be done not with a single attribute, but by having 3 entities, Person, Software and PersonSoftware.  In Person you have one record for all the people in your system, in Software you have one record for all possible software items they could have.  In PersonSoftware you record what software each person uses, if person X uses 5, you'll have 5 records in there for person X.  If software AAA is used by 240 people, you'll have 240 records in there for software AAA.

As for the UI, you can use the Software entity as the source for a dropdown to assign software to a person, for example, or for creating a list of check boxes.

Dorine

I am aware of this however i was asked to try to do in such a way to limit it to one attribute in 1 entity, which in a high code enviroment wouldn't be a problem, The above mentioned solution i have already used however as mentioned above i was asked to see if it's possible to limit it to 1 attribuite in 1 entity. 


In terms of the UI it's not really a problem :)

Ok,

I misunderstood, 

euhm, I am absolutely not a fan of that solution (compressing all in a single attribute), but it is possible, I guess.  You could json serialize and deserialize every time, for example.

So how will you build up that list of options (check boxes) then ?

Dorine

I myself im also not a fan of this however it's not my idea. i think i will just stick to the original method and say this method is not possible/efficent

Hi Ignacy,

You can use the Text app actions to work with strings:

One other option would be to save the content as JSON, this will probably make it easier:

Hope this helps,

Rúben


Thank you for this reply i will try this method to see if it works.

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