(Solved) Populate values from profile document using LS agent?

Hi,

In my web application, I am storing some csv list (which does not change mostly) to a profile document. I want those values to be populated in a text field in another form using a LotusScript agent. This should happen when the form loads.

Which method is best suited? I tried Web/QueryOpen, Web/PostOpen. But they don’t seem to show any values in the field in form.

Simplified depiction:

(Web form)–>(LS Agent)–>(profile doc field)

Kindly suggest.

Thanks

Edit: This query is solved. Kindly see my last post

Subject: RE: Populate values from profile document using LS agent?

You can do this when composing the document, using a field value formula with @GetProfileField. You don’t need an agent.

If it’s an existing document, the formula will still compute on loading the document, if it’s a computed for display field, and providing the document doesn’t already contain an item with that name. So if you change the field type to CFD, you may need to run an agent to delete the field from existing documents.

If this doesn’t answer your question, you have to ask the question in more detail, including a description of exactly what you’re doing now, including source code.

Under normal circumstances, a WebQueryOpen agent can assign fields in the document you are about about to open, and you will see those values in the document. If this is not happening, your agent is failing. Nobody will be able to say exactly why it’s failing, without seeing the code. You should also check the server logs for any error messages from the agent.

Subject: RE: Populate values from profile document using LS agent?

Thanks Andre and Irwing,

I initially wanted to resort to LS agent, but later figured, as Andre suggested, that this can be done simply by using appropriate @ function. Now I can fetch values from profile doc as i intended.

Here is what i wanted and how it was accomplished.

In my domino web application i have a search page with filters. Some filters are listboxes of status, country, etc. To decrease the time of page load, i decided to move these filter values to a profile doc. the profile doc caches these values so it is readily available without incurring any processing overhead.

Now i wanted to fetch these values to my filters form. so i used following function to fetch values and populate the list.

@Explode(

@GetProfileField( “ProfileDocName” ; “ProfileFieldName”)

; “;”)

As simple as that. Cool…

Hope this helps to someone with similar requirement.

-Ronald

Subject: Populate values from profile document using LS agent?

I would suggest first creating your profile document with a formula button: @Command([EditProfile];“<>”). Then you can always refrence your form in LS.

Set ProfileDoc = db.GetProfileDocument( “<>” )

Subject: RE: Populate values from profile document using LS agent?

Thanks Irving,

My prpfile document is already created and values are present. I was looking for a simpler solution without running an LS agent. I was wondering if I can use –

@GetProfileField(“Interest Profile”; “ProfileCategories”)

Tried it, but does not fetch values for me. Any ideas?!