How to show a default value in Reference selector which is using DropDown inside an editable list view

Hi    I using editable list view inside which i am using a reference selector for a field ie “Calculation” which is showing dropdown options from the selectable objects generated by MF. [ Calculation is a String attribute for the  Mendix entity – PriceForecast ] I have 2 use cases being handled in within it: User can edit the Calculation value inside the list view by clicking on it and selecting anything from the values coming in dropdown. and when he submits it, it goes into SQL DB through REST POST API. Also I have the objects of entity Price Forecast getting generated in Mendix and  pre filed by using REST GET API call to SQL DB.   Issue is in 2nd use case: - I create Price Forecast object and copy every attribute from the REST call entity into Price Forecast MEndix Entity. and thus all the objects get flushed into Mendix DB from the SQL DB. But during this copy, i also copy the value coming in REST call as String into the Calculation attribute But once this activity is performed and i see the Price Forecast objects which appear in the list view on launching the screen, Expected: The Calculation attribute data value should get reflected in the default which will be visible to viewer in the reference selector and which is also editable otherwise. Inorder to just show you the data being populated for Calculation attribute from SQL DB into Mendix entity, On Mendix screen, i created a Text field to reflect its value just above the reference selector. Highlighted value in Pic 1 is the data field populated from object creation post GET API call. But Pic 2 shows how exactly i want the data to be dynamically shown as soon as objects got created post GET API call as default value in dropdown. Pic 1 Pic 2 Actual: The Calculation attribute is just showing a dropdown with nothing in default as shown in pic 3 and when i click on it, it shows values in dropdown for selection as shown in Pic 4  Pic 3   Pic 4 My question is around second use case only, how can i handle it such that it shows expected behavior. First use case is working fine
0 answers