I have a bit confused on the below scenario:-
1) I added this formula inside the Visible property of button:-
IsEmpty(
Filter(
'Printing Processes',
'Booking Calendar ID' = varBKID
)
)
the following formula inside the OnSelect:-
If(
IsEmpty(
Filter(
'Printing Processes',
'Booking Calendar ID' = varBKID
)
),
IfError(
Patch(
'Printing Processes',
Defaults('Printing Processes'),
{
'Booking Calendar ID': varBKID,
'Printing Status': {Value: "Draft"}
}
);
,
Notify(
"Can not create prinint order, please check you have the necessary permissions",
NotificationType.Error
),
Blank()
),
Notify("There is already a Prinint Order created for this item",NotificationType.Error)
);
now when i submit the button >> it will be hidden.. so seems the formula inside the Visible property will be re-executed after clicking on the button..
but if i move the formula inside the Visible property of the button to be inside the screen onvisible property of the screen, as follow:-
UpdateContext({varISCurrentPrintProcessItemEmpty: IsEmpty(
Filter(
'Printing Processes',
'Booking Calendar ID' = varBKID
)
)})
and i added the local variable (varISCurrentPrintProcessItemEmpty) inside the button Visible property >> then when i click on the button it will not get hidden.. any advice? why the variable is not smart as the Visible property of the button?
Thanks

Report
All responses (
Answers (