Hi,
I make app, that have several dropdown clasic controlers. 1. controler is "Request", 2. controler is "Order". Order items of dropdown depends on the selection in the Request.
In item's property of Order I have this code:
SortByColumns(
(Filter(
Orders;
new_Customer.Name = cmbox_request.Selected.Customer.Name;
Zahájení <= datp_datum_pozadavky_3.SelectedDate;
Ukončení >= datp_datum_pozadavky_3.SelectedDate
));
"new_priorita";
SortOrder.Descending
)
------------------------------------------
In OnChange property of Order dropdown:
If(
IsBlank(
LookUp(
colGridUpdates;
Aktivita = ThisItem.Aktivita
)
);
Collect(
colGridUpdates;
ThisItem
);;
);;
UpdateIf(
colGridUpdates;
Aktivita = ThisItem.Aktivita;
{
Order: drp_order_lookup.Selected
}
)
;;
Select(ButtonCanvas1_3) - this button make the same as the code above
--------------------------------------------------
AllowEmptySelection property is false
OnChange fungction should modify colGridUpdate table with correct value. But:
Before changing Request (Požadavek):

After changing Request (1.) -> it set to Order correct selectedItem. But into colGridUpdate table it takes/set old value of dropdown Order.

So my question is. OnChange function starts before changing Items property?
Can I change it so that it first changes the Items property and pulls/sets the value displayed in green to colGridUpdate using the OnChange function?
When I enable AllowEmptySelection, after changing Request, the Order dropdown is empty - the user must select a value.
Thanks for any advices