What is easier to read / understand / debug?
This:
DBName := @Implode(@Explode(@Subset(@DbName;-1);"\\");"/");
@Command([FileSave]);
@Command([ToolsRunMacro]; "(UpdateFTIndex)");
@If(@ClientType="Web" & @IsNewDoc;
@Command([OpenNavigator];Section);
@ClientType="Web" & ReadersDescriptive!="Anyone who can access the database.";
@URLOpen("/" + DBName+"/int/GoBack4" );
@ClientType="Web";
@URLOpen("/" + DBName+"/int/GoBack3" );
@PostedCommand([FileCloseWindow])
)
or this:
DBName := @Implode(@Explode(@Subset(@DbName;-1);"\\");"/");
@Command([FileSave]);
@Command([ToolsRunMacro]; "(UpdateFTIndex)");
@If(@ClientType="Web" & @IsNewDoc; @Command([OpenNavigator];Section);@ClientType="Web" & ReadersDescriptive!="Anyone who can access the database.";@URLOpen("/" + DBName+"/int/GoBack4" );@ClientType="Web";@URLOpen("/" + DBName+"/int/GoBack3" ); @PostedCommand([FileCloseWindow]))
It is the same code but is just displayed with spaces and extra return lines.
I rest my case.
Rule of thumb stick an extra carriage return in whenever there is a ";" or a bracket at the end of a line, not inside an @formula or as part of an @formula.
Try and indent the result of the @if.
e.g.
@if( condition1;
do this;
condition2;
do this;
condition3;
@do(
do this ;
and this
);
else do this
)