Hope everyone is doing great ❤
Recently, I had a requirement to show / hide the Workflow button based on certain field value.
Portal has provision for it.
In Action button configuration advanced settings, we can find Filter Criteria text box. There you can put FetchXml filter condition.
It does the magic on load of the form in Dynamics portal.
Like above FetchXMl, Button will be visible when the lead is in Open state. Hope it help somebody.