By which button you click...duplicate your script and alter the GoToLayout portion on each copy...then have each button launch the appropriate version of the script.
By which radio button is selected, (radio button selection on your layout for invoice type to use)...
Make your GotoLayout step within an If statement that checks the value of the radio field.
Instead of duplicating the script for each layout, your different buttons could pass the name of the desired layout as a script parameter and then you can use get ( Script Parameter ) with the "layout name by calculation" option in Go To Layout to go to different layouts via the same script.
As long as your layouts are all based on the same table occurrence name in Layout Setup...| Show Records From, your Go To Related Records step can be the same for each button, but you follow it up with a go to Layout step that selects the correct layout for the button clicked.
I am a newbie to filemaker commands, syntax and scripting. Can you write the IF/Else statement that needs to be added to this script.