changing the selected item in a combo box

Hello,

I have a gender combo box which is populated using a gender static entity. In the user table there is a gender field stating the gender.

What i am trying to solve is changing the selected gender in the combo box based on the gender of the user. If it normally starts with Male but the user is female i want the page to start with the combo box item on female. Thanks

Hi, friend.

The combo box uses an identifier attribute. You can do that changing the value saved for an user with a condition like if(user.gerder = male, variable = femaleid, variable = maleid).


Best regards

Hello,


Can you send an example you are doing? In the entity where you keep the association between the user and the genre, are you correctly assigning the value to the variable consumed in the combo box?


Regards

Diana Milheiro wrote:

Hello,


Can you send an example you are doing? In the entity where you keep the association between the user and the genre, are you correctly assigning the value to the variable consumed in the combo box?


Regards

There is no user entity i am using APIs provided to me to retrieve and update the table. So i am trying to make the combo box select either male or female depending on the gender of the user in the database


Lenon Manhães wrote:

Hi, friend.

The combo box uses an identifier attribute. You can do that changing the value saved for an user with a condition like if(user.gerder = male, variable = femaleid, variable = maleid).


Best regards

I dont see how i can do that. Can you explain further?

Hi Salman Albalooshi,

If it normally starts with Male but the user is female i want the page to start with the combo box item on female.

As per the shared requirement information, I think by following the below mentioned steps you can achieve what you are required for...

Implementation Steps:

1) In the preparation action flow, Check the current Logged-in user gender value from the respective User database table (Filter by UserId)

2) Assign the User GenderId (referring the aggregate output value obtained from point 1) to the Gender Combox mapped variable i.e. GetGenders.List.Current.Gender.Id



Hope this helps you!


Regards,

Benjith Sam

Benjith Sam wrote:

Hi Salman Albalooshi,

If it normally starts with Male but the user is female i want the page to start with the combo box item on female.

As per the shared requirement information, I think by following the below mentioned steps you can achieve what you are required for...

Implementation Steps:

1) In the preparation action flow, Check the current Logged-in user gender value from the respective User database table (Filter by UserId)

2) Assign the User GenderId (referring the aggregate output value obtained from point 1) to the Gender Combox mapped variable i.e. GetGenders.List.Current.Gender.Id



Hope this helps you!


Regards,

Benjith Sam

Hi Benjith,

The issue i have is that the table for users i have doesn't have a genderId only gender text field that states that its male or female. The server i am working on is down currently tomorrow i will try to find a solution around what you sent. If you have any information based on what i said here please tell. Thanks for your time.

Kind regards.


Hi Salman


Try something like in this your assign:


if(GetUserById.List.Current.User_Ext.Genderid = GetGender(Entities.Gender.Male).Gender.Label, GetGender(Entities.Gender.Male).Gender.Id, (Entities.Gender.Female).Gender.Id)


I'm assuming that you Genderid from User_Ext is a text like Male or Female.



Diana Milheiro wrote:

Hi Salman


Try something like in your assign:


if(GetUserById.List.Current.User_Ext.Genderid = GetGender(Entities.Gender.Male).Gender.Label, GetGender(Entities.Gender.Male).Gender.Id, (Entities.Gender.Female).Gender.Id)


I'm assuming that you Genderid from User_Ext is a text like Male or Female.



i see no interaction with the combo box. So I am assuming it edits the attributes of the gender entity. I will try it out when I can. Thanks 


Salman Albalooshi wrote:

Hi Benjith,

The issue i have is that the table for users i have doesn't have a genderId only gender text field that states that its male or female. The server i am working on is down currently tomorrow i will try to find a solution around what you sent. If you have any information based on what i said here please tell. Thanks for your time.

Kind regards.

Within the preparation action flow using the assignment node you will assign value for

GetGenders.List.Current.Gender.Id =


Code Snippet

If(ToUpper(Trim(GetUserById.List.Current.User_Ext.Gender)) = "MALE", 
  Entities.Gender.Male, 
     If(ToUpper(Trim(GetUserById.List.Current.User_Ext.Gender)) = "FEMALE", 
         Entities.Gender.Female,
              NullIdentifier()))


Hope this helps you!


Regards,

Benjith Sam