Dropdown OnChange

Hi.

I have an add form with a dropdown. I am attempting to use the OnChange event to set the values of two other fields on the form with related values. Though they are relational the underlying values can change and i want them to be set at record level each time.

I.e. I have a log table with TaskId, Duration and Days. And also a task table with Id, Duration and Days. When I select the task on the add log form I want to set the duration and days to the underlying values e.g. log.Duration = log.task.Duration.

I have tried a couple of ideas and haven't gotten it to work, is it possible?

Many thanks

This demo might help you: