Configuring path back to SaveDocument?


We are using an XML form to pass data to and from our web server from our CMS in Notes.

Historically we have done this using the @Text(@DocumentUniqueID) to identfy the document so our web server can post back "i_have_done_this"

this has produced the following


We would like to cease using @Text(@DocumentUniqueID) and instead use a alternative field that produces Unique but shorter number called UniNumber.

ON first attempt and not surpirsingly the result

produced a error 404 page not found.

Is there a way to configure notes to point to the documents by our field "UniNumber" rather than  @Text(@DocumentUniqueID)?

thanks in advance

Who is Participating?
Sjef BosmanConnect With a Mentor Groupware ConsultantCommented:
Assuming that the Unique number is already stored in the document, you need a different (new) view, with UniNumber as the first column, sorted ascending. This view's name should be used in the URL.

By the way, are you the developer of this application?
Sjef BosmanGroupware ConsultantCommented:
The JGHY-78JU is the key in the view. Either create a different view or adapt the view, so it has indeed the shorter "number" as key.

Or you can write an agent that doesn the job for you, called as:


It depends on the moment you want to use it, what method to choose.
tashsmithAuthor Commented:
Hi Sjef,

Slightly confused by your post, the view name is SendStuffForPublishing..
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Sjef BosmanGroupware ConsultantCommented:
Totally confused by your posts now...

You have a view SendStuffForPublishing, what is the key, the first column? Probably it is the @Text(@DocumentUniqueID), since the URL is constructed as

So, if you want to use a different key, you have to construct the view differently.

The other way to do something with Notes documents is to use an agent. I named the agent (maybe somewhat confusing :$ ) SendStuffForPublishingAgent, and the way to call an agent is
tashsmithAuthor Commented:
OK, Im understanding you now :-)

Im going to have a play, be right back...
Ah, the sendStuffforPublishing probably has a first sorted column: with DocumentUNID, you need to change the formula in this column to your field name that has the value: JGHY-78JU .

You don't have to use the sendStuffforPublishing view, you can use any new view name that is set as the DEFAULT view, sorted, and with the first column having a formula that displays the JGHY-78JU field.

Then your command to open is the http://server/database.nsf/default_or_named_view/key?Opendocument

If you don't want the ugle Error 404, then reference the view in a $$ViewTemplateDefault form ($$ViewTemplate for ThisView)
and include a $$Return field on the form to display your custom error message.

JGHY-78JU << by the way, is this a random, @Unique command?  Just so you know, and I'm not sure this applies to the later versions of Notes, but the @Unique command doesn't necessarily or all the time spawn a unique code.  It does it MOST of the time.

does this help?
Sjef BosmanGroupware ConsultantCommented:
You're supposed to say
    I hope this helps!

Can it be we have the same opinion, differently phrased of course??
tashsmithAuthor Commented:
this is what i currently have as my first column formula

"<to_publish><UniNumber>" + UniNumber + "</UniNumber>" + "<URL>" + "http://server/database.nsf/view/" + @Text(@DocumentUniqueID)  + "?SaveDocument&Login=1</URL></to_publish>"

this works

"<to_publish><UniNumber>" + UniNumber + "</UniNumber>" + "<URL>" + "http://server/database.nsf/view/" + UniNumber + "?SaveDocument&Login=1</URL></to_publish>"
this doesn't

I want to second one to work...
tashsmithAuthor Commented:
ok fixed it and no I am not a Notes Application developer Sjef, isn't it obvious :-)
Sjef BosmanGroupware ConsultantCommented:
Thanks :)

At first I didn't understand. We're always assuming here, and that influences the way the response is formulated a lot. There's no shame in being new to something (I know NOTHING about Apple computers), it would have been easier for us if you had said so right from the start. Anyway, you solved the problem, which makes me smile again :)

What makes me sad though is that you gave me a C :'(  Did I do something wrong???

Please read
    "How to grade"
tashsmithAuthor Commented:

Nope nothing at all, it appears I did though... I will contact admin
Sjef BosmanGroupware ConsultantCommented:
Happy again :-D

A good moment to call it a day... (23:39)
sjef - we said the same thing differently.. I provided a more detailed explanation.  And you know the rest.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.