Hallo ,
so liebe gemeinde ich wollte mir heute viel Tiparbeit sparen und habe ne kleine for-Schleife geschrieben
_specialRights:= "createDocuments" : "deleteDocuments" : "createPrivateAgents" : "createPersonalFoldersViews" : "createSharedFoldersViews" :
"createSharedFolders" : "createLoutsScriptJavaAgents" : "readPublicDocuments" : "writeDocuments" : "replicateOrCopyDocuments";
@For( n := 1 ; n<= @Elements(_specialRights) ; n := n + 1 ;
_pos := n;
_word := n + 2;
_fieldName := @Subset(@Subset(_specialRights;n);-1);
_value := @Word(_restData;"|~|";_word);
@Prompt([Ok];"Test";_value);
@If(_value = "true"; @SetField(_fieldName;".");"")
)
Mein Problem liegt nun darin, dass ich anstatt des @setfield den Wert mit Field setzten muss damit es im UI funzt, gibt es da ne Möglichkeit es zu ändern
EDIT: Ich war so frei, mal der besseren Lesbarkeit halber einen Umbruch zu organisieren. Bernhard
Ja das Refresh hatte ich drin, aber er hat es nicht umgesetzt, naja habe es jetzt folgendermaßen gemacht :
_del1 := "|#|";
_del2 := "|~|";
_pos := @TextToNumber(@Word(pickPosition; "-";1));
@If(_pos = 0 ; _pos := 1;"" );
_data := @Subset(@Subset(posDataString;_pos); -1);
_restData := @Word(_data;_del1;2);
FIELD userName := @Word(_restData;_del2;1);
FIELD userType := @Word(_restData;_del2;2);
FIELD level := @Word(_restData;_del2;3);
FIELD activeRoles := @Explode(@Word(_restData;_del2;4);"*");
FIELD createDocuments := @If(@Word(_restData;_del2;5) = "true" ; ".";"");
FIELD deleteDocuments := @If(@Word(_restData;_del2;6) = "true" ; ".";"");
FIELD createPrivateAgents := @If( @Word(_restData;_del2;7) = "true" ; ".";"");
FIELD createPersonalFoldersViews := @If( @Word(_restData;_del2;8) = "true" ; ".";"");
FIELD createSharedFoldersViews := @If( @Word(_restData;_del2;9) = "true" ; ".";"");
FIELD createLotusScriptJavaAgents := @If( @Word(_restData;_del2;10) = "true" ; ".";"");
FIELD readPublicDocuments := @If( @Word(_restData;_del2;11) = "true" ; ".";"");
FIELD writePublicDocuments := @If( @Word(_restData;_del2;12) = "true" ; ".";"");
FIELD replicateOrCopyDocuments := @If( @Word(_restData;_del2;13) = "true" ; ".";"");