Im using a card to create a new record but Im getting this error "This record cannot be modified in this window because it is already being modified in a different window.
That means that you have a record open in another window and whatever action is tripping this error is attempting to modify that record. So a) look for what modification is taking place to an existing record and b) look for the right place to insert a Commit Records step if needed to eliminate the condition causing the error.
Sounds like you are testing your script and did not close the prior window before retrying the script whic philmodjunk pointed out.
Just to add on, when you open a card window based on the same TO (table occurance), it will open to the same record, similar to selecting 'New Window' from the top menu bar-creating the record locking issue.
So you have to commit the record in the first window, as Phil stated, before you open the card window.
Retrieving data ...