Toggle(switch) button can not affect only one i clicked

Hello,

I tried to use toggle buttons, but when i clicked any one of toggle buttons, all of them are affected to be changed,this is requirement i wanted.  how to make it like that: when i click one toggle button, only this toggle button status is changed, and others should not be affected. how to do it?  my application is like the bollowing picture:

Thanks in advance.

Solution

Change this to boolean

The inside of the update server action you will need just to update the entity record using the action from the entity Line

Then you will just need to pass the record that you are updating

You will need to change the attribute name because you cannot change a data type from an attribute that you already created.

Dont forget to change this to active


Look at the result.

PS: you will need to change your file or your bootstrap because you will need to accept a boolean and if you don't change that, right now there is no logic for that. If you don't want to change excel of the Line you will need to do the logic on bootstrap by checking if that field is null or not and if so it will be false.

To work, I change the excell and uploaded it again to OutSystems.

I will share my version, please check the OML(on the OML it doesn't have the excel version updated.)

Let me know if this helps you.

Kind Regards,

Márcio

test1_MarcioVersion.oml

Hello, can you share your OML/file? I think when you are listing something, or you have that boolean attribute for each of the records on the entity that you are trying to get the data, or you can add that in the aggregate where you are getting the data.

Kind Regards,

Márcio

Hello Marcio,

Thanks for your quick answer. I still do not know how to solve it. i share the oml as attached. could you please give me more details? thanks in advance.

test1.oml

Solution

Change this to boolean

The inside of the update server action you will need just to update the entity record using the action from the entity Line

Then you will just need to pass the record that you are updating

You will need to change the attribute name because you cannot change a data type from an attribute that you already created.

Dont forget to change this to active


Look at the result.

PS: you will need to change your file or your bootstrap because you will need to accept a boolean and if you don't change that, right now there is no logic for that. If you don't want to change excel of the Line you will need to do the logic on bootstrap by checking if that field is null or not and if so it will be false.

To work, I change the excell and uploaded it again to OutSystems.

I will share my version, please check the OML(on the OML it doesn't have the excel version updated.)

Let me know if this helps you.

Kind Regards,

Márcio

test1_MarcioVersion.oml

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