Hello Community,
Adding the finishing touch to my canvas app but unsure how to go about adding an IF Statement to my current set-up.
I have a text input "cost" which cannot be blank but if "cost" is equal to or greater than $500,000.00 i need "reference" to be mandatory - warning icon and text label needs to be activated on "reference" . At the same time Submit for Approval button needs to also be disabled until a 'reference' is inputted.
This is what I have On Select for the "Submit for Approval" button ;
If(
'PowerAutomate'.Run(id.Text,vendor.Text,droptitle.SelectedText.Value,cost.Text,approver.SelectedText.Value,contracttype.SelectedText.Value,term.Text,reference.Text,type.Text,details.Text,docusign.Text).success = "True",
Notify(
"Sucess",
NotificationType.Success,
3000
);
Navigate(SucessScreen,ScreenTransition.Fade);Reset(droptitle);Reset(term);Reset(approver);Reset(cost);Reset(type);Reset(details);Reset(docusign);Reset(reference),
Notify(
"Your request has failed, please reach out to anonymous@anonymous.ca.",
NotificationType.Error,
4000
)
)
This is what I have on Display Mode for the "Submit for Approval" button;
If(!IsBlank(vendor.Text) && !IsBlank(proc.Text) && !IsBlank(cost.Text) && !IsBlank(term.Text) && !IsBlank(type.Text) && !IsBlank(details.Text) && (approver.SelectedText.Value <> "Select Approver") && (proc.Text <> "Unassigned") && (contracttype.SelectedText.Value <> "Select Contract Type") && !IsBlank(docusign.Text),DisplayMode.Edit,DisplayMode.Disabled)
This is what I have on visible for the icon for "cost";
If(!IsBlank(cost.Text),false,true)
Any input is appreciated.
Solved! Go to Solution.
Hi @batvan276 ,
The reference icon and Text Input hide when cost is less than 500,000.00, so Visible of them are the same:
IsBlank(cost.Text) || (Value(cost.Text) < 500000)
For the Submit Button, if reference is activated and not blank, Button needs to be visible, otherwise it's hidden, am I right? If so, use below formula on DisplayMode property:
If(
!IsBlank(vendor.Text) && !IsBlank(proc.Text) && !IsBlank(cost.Text) && !IsBlank(term.Text) && !IsBlank(type.Text) && !IsBlank(details.Text) && (approver.SelectedText.Value <> "Select Approver") && (proc.Text <> "Unassigned") && (contracttype.SelectedText.Value <> "Select Contract Type") && !IsBlank(docusign.Text) && (reference.Visible && !IsBlank(reference.Text)),
DisplayMode.Edit,
DisplayMode.Disabled
)
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Hi @batvan276 ,
The reference icon and Text Input hide when cost is less than 500,000.00, so Visible of them are the same:
IsBlank(cost.Text) || (Value(cost.Text) < 500000)
For the Submit Button, if reference is activated and not blank, Button needs to be visible, otherwise it's hidden, am I right? If so, use below formula on DisplayMode property:
If(
!IsBlank(vendor.Text) && !IsBlank(proc.Text) && !IsBlank(cost.Text) && !IsBlank(term.Text) && !IsBlank(type.Text) && !IsBlank(details.Text) && (approver.SelectedText.Value <> "Select Approver") && (proc.Text <> "Unassigned") && (contracttype.SelectedText.Value <> "Select Contract Type") && !IsBlank(docusign.Text) && (reference.Visible && !IsBlank(reference.Text)),
DisplayMode.Edit,
DisplayMode.Disabled
)
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
User | Count |
---|---|
261 | |
110 | |
90 | |
54 | |
44 |