How to set mandatory item filling by item value from another table

Hello, please advise me how to set in scripting the obligation to fill an item based on a value in another item that is linked to another table.

I tried it like this:
doo.model.datumSjednaneSchuzky.isRequired = doo.model.stav.value === ‘Navolaná schůzka’

The Status field is of type Table Binding and the ‘Navolaná schůzka’ value is a value from the Status table. I think the error is in my doo.model.status.value notation, but I don’t know how to write it differently.

Thank you. Milan

Hi,
we’ve already solved this, am I right?
if(doo.model.stav.currentlyCahnged) {
doo.model.datumSjednaneSchuzky.isRequired = doo.model.stav.value.nameField === ‘Navolaná schůzka’ ? true : false;
};

Regards,
Filip