Link to home
Start Free TrialLog in
Avatar of Jaziar
Jaziar

asked on

Modifying a @Authors field

I have performed a survey.  In my views I have used @Name([OU1]; @Author) != "Name" to parse my data my area worked.  It was great and worked well.  I then wrote an agent that would search each document and look for comments and if the document had a comment it performed a action.  So now every document that has a comment as appended my name to the @authors field.

Bobby Socks/name/company, Jaziar/user/company

So now my logic

SELECT Form = "Survey" & @Name([OU1]; @Author) != "name"


Is not working.  I do not know how to parse it out of the view or do I have to edit the @authors field somehow??
Modifying a @Authors field
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

The @Author is evaluated only once, and not for every document. You need a value inside the documents. Maybe, $UpdateBy will do the trick.

Try this one:
SELECT Form = "Survey" & @Name([OU1]; @Subset($UpdatedBy; -1)) != "name"
Avatar of Jaziar
Jaziar

ASKER

Nope - did not work for me
I would suggest  that you use something like @explode to access just the first Author.
I hope this helps !

Heh... $UpdatedBy already is a string list...

If you want to see if "name" is a member of all previous authors of the document, you need to use @IsMember:

SELECT Form = "Survey" & @IsMember("name"; @Name([OU1]; $UpdatedBy))

Did you check the $UpdateBy field in the document properties of a Survey document??
Unless you likit your $UpdatedBy tracking, the value will be there.

You really should have your own field on the form, Modifiers, value:
@If(@Subset(@ThisValue;1) = @UserName; @ThisValue; @UserName : @ThisValue)

Then, you would always be able to tell all the people who had touched the doucment USING YOUR FORM, and who the last one was -- @Subset(Modifiers;1)

That is basically what $UpdateBy does, except it tracks changes made by any method (form, agent, external program, replication conflict resolution).
Avatar of Jaziar

ASKER

$UpdateBy does include both names.
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jaziar

ASKER

That was it