Good day,
(My English is not good, understanding on my grammar and vocabulary mistake are appreciated)
My question is how to auto populate field B when select on a dropdown.
For example, I create an entity 'Task' and 2 static entities 'Priority' and 'Duration', When I select an option from the 'Duration' dropdown (1 month), then the duration will will auto populate as 'Low' priority; When I select option 1 week, the duration will be 'High'.
Any response are appreciated.
Thank you,
Regards.
Hi Joe Ng,
I am sharing an OML file for your reference. It would be easy for you to understand from there.
Also, check this URL where I have implemented the same:
Task Logic
Hope this helps!
Regards,
Prakhar Sharma
Perfect!
Hi Prakhar Sharma,
Your solution solve the problem I face, thank you!
Good day ahead.
Regards,
Joe Ng
Hi Joe ng,In priority expression, please follow this conditionIf(DurationIdentifier=Entities.Duration.Month,"Low","High") or you have static Entity for priorityIf(DurationIdentifier=Entities.Duration.Month,Entities.Priority.Low,Entities.Priority.High ) I attached the OML also please refer it, it will help you .regardsrajesh.
Hi Rajesh Venkat,
Thanks for your response, however its not works. The priority is static entity and have (example) 2 records, I need it changes based on the dropdown I selected such as when I select 1 month, then the (expression) will change to Low.
Anyway, this is a good reference for my study on Outsystems.
Joe Ng.
You need to create an OnChange for the Duration Dropdown. As soon as you select a value in the dropdown, set the desired priority in the OnChange action.
Eg: Lets Assume you have your Duration as 1 Month, 1 Week and 1 Day and your Priority as Low, Medium and High, then:
If you have selected 1 Month as duration (as given in the example), then in the OnChange, your condition needs to something like Priority = If(Duration = Entities.Duration.1Month, Entities.Priority.Low, If(Duration = Entities.Duration.1Week, Entities.Priority.Medium, Entities.Priority.High))
Regards,Prakhar Sharma
Thanks for your response,
I am not sure in the OnChange, should I use If to set the condition?
I have 2 static entities(Priority and Duration), when I select on the dropdown option(GetTaskById.List.Current.Task.DurationId), for the expression what should I set inside the value?
I have no idea what should I set for the expression.
(Do you mean in the OnChange event, after I set the condition similar as the condition you suggest, the Priority will auto populate depends on the selected dropdown option? Hope I get your mean, if not please correct me. Thank you).
Thanks again for your response,