55
Views
21
Comments
Solved
Problem with creating a Dropdownlist and can't find a solution


Hi

I just started using Outsystems and I have problem creating a Dropdown list from a record, I created multiple dropdown lists with each connected to different record, I want it to show these record and register it in my database, for example:

I have Shifts dropdown list

it should show

B

C

A

And when the user chooses A it register under shift in the database.

Thanks

T1Operations.oml

mvp_badge
MVP
Rank: #90
Solution

Faris Abdullah Almozini wrote:

I'm sorry I know I'm taking so much of your time, but I did every step and published it and nothing changed.

I have attached the updated project file.



If the above mentioned steps is not working out then..

1) Close the existing module without doing any changes

2) Reopen the module

3) Copy and Paste the Shifts Static entity and do all the required changes (rename the newly created entity)

4) Update the old Shifts Static entity reference with the newly created Static entity and publish the module 


Hope this helps you!


Regards,

Benjith Sam

Rank: #44

Hi Faris,


You need to bind your dropdwon list witht he ShiftIdentifer variable then that variable will hold the id of the selected values from dropdown.atfer that you can assign the ShiftIdentifer selected value into the Entity Foreign key column

(ArrFlightDom entity set Shift column from the Shiftidentifer)

Hope this helps

Rank: #1054

Hi Salman,


Firstly, once you select from the dropdown I hope you are saving its id under a local variable(let's name it shifts, datatype shift.id).

in your save action try assigning it with the variable where it should get registered.


shifts= newvariable.id


Can you try this and let me know if it helps?

mvp_badge
MVP
Rank: #90

Hi Faris Abdullah Almozini,

1) Introduce a local Variable called SelectedShiftId (Shifts Identifier data type) and map the Local variable to ShiftDropdown widget Variable field and set the OptionText and OptionsValue field value as mentioned below.

On the selection of Shift option using the dropdown widget, the respective shift option ShiftId will get stored in SelectedShiftId Local Variable which you can use further in the source record attribute value of CreateOrUpdateArrFlightDom Entity action.

PFA - includes .oml Solution file

Let us know if you face any more difficulty.


Hope this helps you!


Regards,

Benjith Sam

T1Operations.oml

mvp_badge
MVP
Rank: #90

Hi Faris Abdullah Almozini,

This is the UI canvas view, which I can see in my Service studio :)

It might be some visual glitches, check with the actual application output.



Regards,

Benjith Sam


Please check the file attached after I did what you suggested.

T1Operations.oml

mvp_badge
MVP
Rank: #90

Hi Faris Abdullah Almozini,

Sorry I didn't obsereve the complete .oml file previously, I found some mistakes in your solution file...


1) The Shifts Static Entity

  a) It consists of an FK attribute called Shifts which is of ShiftsId data type, making a self loop.

  b) The respective static entity is not having any Label attribute to hold the Record Label value i.e. A, B and C

- Update the Shifts Static Entity definition as shown below...

Introduce a Label attribute to the Shifts Static entity, which is of Text data type and manually assign the Label attribute text value (i.e "A", "B" and "C") to each Shifts static entity record.

Note: Don't pass the Entities.Shifts.A as Label attribute Value for the record.

Entities.Shifts.A - it is an identifier for that specific record not a Text value.

PFA - includes the updated .oml file


Hope this helps you


Regards,

Benjith Sam

T1Operations.oml

mvp_badge
MVP
Rank: #90

Hi Faris Abdullah Almozini,


PFA - includes updated Latest Shared .oml file.


Regards,

Benjith Sam

T1Operations.oml

mvp_badge
MVP
Rank: #90

Hi Faris Abdullah Almozini,

Please confirm the success of the implementation after testing the application using Browser or in Native device :)

Hope this helps you!


Regards,

Benjith Sam