Hi @pabbott,
Could you please share a screenshot of your flow's configuration?
Do you want to change the listform.aspx into customform.aspx within the Link to item dynamic content?
If you want to change the listform.aspx into customform.aspx within the Link to item dynamic content, I have made a test on my side, please take a try with the following workaround:
Within Compose 2 action, Inputs field set to following formula:
replace(outputs('Compose'),last(split(split(outputs('Compose'),'?')[0],'/')),'CustomForm1.aspx')
or
replace(outputs('Compose'),'listform.aspx','CustomForm1.aspx')
Note: The CustomForm1.aspx represents the custom form on your side. On your side, type the following formula:
replace(outputs('Compose'),last(split(split(outputs('Compose'),'?')[0],'/')),'customform.aspx')
or
replace(outputs('Compose'),'listform.aspx','customform.aspx')
The flow works successfully as below:
But if you change listform.aspx into customform.aspx within the Link to item dynamic content, the modified link could not be open well, so you could not go to your specific/custom form via the modified link.
If you want to go to your specific/custom form via editing the Link to item dynamic content, I afraid that there is no way to achieve your needs in Microsoft Flow currently. If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:
https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas
Best regards,
Kris