I’m simply trying to create a button to change the value of a field with the doc is chosen, then refresh the document. I’m selecting the doc then clicking the button.
I’m getting this message and it’s not working?
“Someone else modified this document at the same time”
(@SetField(“Author”;@Prompt ([OkCancelList] ; “Change Name” ; “Select the new name.” ; “” ; @DbColumn(“”:“NoCache”; “893470BD:002F9A3F”; “Name”; 1))));
@Command( [ToolsRefreshSelectedDocs] )
Subject: error on @setfield
Break your formula this way and try again:
tmp := @Prompt ([OkCancelList] ; “Change Name” ; “Select the new name.” ; “” ; @DbColumn(“”:“NoCache”; “893470BD:002F9A3F”; “Name”; 1));
@If(tmp != “” | @Text(tmp) != “1”; @Do(
@SetField(“Author”; tmp);
@Command( [ToolsRefreshSelectedDocs])); @Return(“”));
Subject: RE: error on @setfield
I’m still getting the error message. I’m putting a check beside the document then clicking the button.
Normally I would just run the agent to change something like this but I’m trying to set the button for the user to select. @SetField(Author; “thepersonsname”);
For some reason that basic agent is not working either. Can anyone shed some light on what’s going on here?
I’ve tried this on a local copy and on the server copy.
Subject: RE: error on @setfield
Mistake, I was forgetting the stinking quotes on the regular agent: @SetField(“Author”; “thepersonsname”);
I’m still getting that message though: about someone else trying to edit the document.
Does anyone know what’s going on?
Thanks!
Subject: RE: error on @setfield
Mistake!!!
I was leaving off the quotes. I guess I changed something and forgot to put them back on: @SetField(“Author”; “thepersonsname”);
I’m still getting that message though about someone trying to edit the document when trying to run the new formula suggested. Does anyone know what’s going on.
Thanks!
Subject: RE: error on @setfield
Does anyone have a suggestion? I’m still stuck on this getting this to work.
Thanks!
Subject: RE: error on @setfield
Remove the last line : @Command(ToolsRefreshSelectedDocs)
Subject: RE: error on @setfield
I got the error that you must have an odd number of arguments. I used this. I assume it’s just as good as the other…
tmp := @Prompt ([OkCancelList] ; “Change Name” ; “Select the new name.” ; “” ; @DbColumn(“”:“NoCache”; “893470BD:002F9A3F”; “Name”; 1);
@SetField(“Author”; tmp);
Subject: RE: error on @setfield
End bracket missing for @Prompt(…)
tmp := @Prompt ([OkCancelList] ; “Change Name” ; “Select the new name.” ; “” ; @Trim(@DbColumn(“”:“NoCache”; “893470BD:002F9A3F”; “Name”; 1))); @SetField(“Author”; tmp);
Subject: RE: error on @setfield
Thank you! ;O)