Help!: Can't save value on QuerySave event by LS

Dear,

A form with two fields, one field named “member_list”,the other field named “Allow_reader”.

I wrote code in QuerySave event as bleow,

If uidoc.isnewdoc = True Then

Set doc = uidoc.document

Call doc.AppendItemValue(“member_list”,“[Super_User]”)

memberstr = doc.GetItemValue(“member_list”)

Call doc.ReplaceItemValue(“Allow_reader”,memberstr)

Continue = True

Call uidoc.save

end if

System error Prompt:

1.Attemp to execute nested from events

2.Notesuidocument: save cancelled

and I found value in uidoc is unable to save in doucment

If I write off “Call uidoc.save” in QuerySave event,no any error prompt,but even no assigned value is save in document

who knows what happen? need your help.thanks

Landy

Subject: RE: Help!: Can’t save value on QuerySave event by LS

You can’t do a front-end save inside the querysave because it leads to infinite regress. The attempt to save will cause another call to querysave before you finished the first one.

AppendItemValue is not a good method to call in Querysave code. Please read the documentation. The new item you just created this way is not accessible because there’s already another item called member_list.

You didn’t say what you were trying to do, so I can’t tell you how to do it right. But if this is all the code you have, it’s almost certainly going to be easier to use a formula. E.g. you might just need to make the Allow_reader field computed with the following formula: @trim(member_list : “[Super_User]”).

Subject: Help!: Can’t save value on QuerySave event by LS

You asked this question before and got an answer to it. You should continue in that thread instead of reposting.

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/82efc7258f708a00852570d20032c966?OpenDocument

/Peter