Hilary,
You are a great help. I don't understand the formula. What I'm trying to do is set the ID to 1 if there is no forms in the Forms Library, so my concat("I", "P", max(@ID) + 1, substring(DisplayName, 1, 1), substring(AgentSSN, 1, 1)) can work properly. for my data connection and submit. I set up a bollean field element called IDEmpty and set the value to false. The condition on this field states: If ID is Blank
Set a field's value @ID= 1
Don't think this is working.
The formula for the example is long and confusing.