Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with views and forms-designing a billboard

Status
Not open for further replies.

nikyD

Programmer
Jan 24, 2006
1
SI
Hello!
I'm a newbe using lotus domino. So I'm trying to do my first project and it's about a billboard where you post what you want to sell. I've made the basic gui with forms and two views.

My first problem is:
In my form you have a radio button named CHOICES and I want that this selection sorts my view (which shows ads) so it shows only the selected type of posts-Can somebody help and write the formula to do that.

The second one is:
I want to add functionality which sends messages to users(every user has a watchlist where he selects the tipe of ads he is interested in), so I have to read this choice of every user and get his e-mail.

And my last problem is with responses to ads:
I have a two forms with a fields named NR_AD, both fields have a computed value of number_of_ad which is consecutive number of the ad. I want to show the original document and the responses in the same view but my view shows only a blank line where my response should be. If i open the response there is no value in the NR_AD field but was there when I've constructed the response. Could somebody give me a hint with that?

I'd appreciate your help very much.

Sergej
 
If I may, this is a developer question and it would have been better to post it in the Notes forum. But that is a detail.

For your first problem, you need to know that Notes does not do dynamic sorting of a view. You can have a categorized view, and you can re-sort that view following set criteria, but all this has to be done in Design and cannot be modified on-the-fly by user criteria.
Next, I have a question : is your Choices field supposed to present a list of choices equal to categories, so the user can choose among the categories and then see the corresponding documents ?
If so, what you can do, technically, is create a form with an Embedded View. The Embedded View has the particularity of opening a categorized view in the document and displaying only the categories that correspond to a selection key.
The selection key can very well be your Choices field.
This solution requires a bit of programming on your part. The advantage is that you will get the desired solution as well as a good learning experience. The disadvantage is that you're going to spend some time getting there, and this solution is not aware of any other issues that could be created with the rest of your application.
On the other hand, there is another possibility that is the preferred Notes method : let the users just use the categories in the view, opening whatever categories they want and checking out the documents therein. This solution has the enormous advantage of being defined by view properties, so no programming difficulties there, and it leaves the user free to view the categories as he wishes, without restraint. Of course, no brownie points for developer experience here.
Could you give me feedback on this, so that we can determine if we're going in the right direction ?

Your second problem is quite different, and there is no easy, predetermined solution. In fact, I think that your only possibility is a scheduled LotusScript agent. For you, this is going to be a lot harder than categorizing a view - especially if you have no prior development experience in any object-oriented language.
In principle, all you need is an agent running every night, that checks for each user what is on his watchlist, collects the links and sends him the newsletter. For an experienced developer, it's a day's work. We'll have to go through it step by step, and that'll take a bit longer.

Finally, your last problem :
If I may say so, you are making the common mistake of newcomers to Notes : wanting to put sequential numbers in a Notes document thread.
Notes has no use for sequential numbering. You want to link to the response from the parent document ? When you create the response, include its UNID in the parent doc (in a field). If the parent doc has a UNID in that field, you can simply display a button that opens the doc linked to.
Responses automatically get the parent UNID, so you can always have a button linking to the parent doc.
You see, you have no need for sequential numbering to get where you want.
As for the view, you can only display Response documents in a Response column. The procedure is as follows :
1) create the first (sorted) column of the view
2) create the Response column (check the option "Show responses only" in the column properties)
3) create the other columns of your view
4) remember that "normal" columns will display data only from your parent documents, and that the Responses column needs a formula to display data from the Response docs

What this means is that the formula you put in the Responses column must account for all the data that you wish to display there. That is not always an easy task.

A friendly tip : you need to take a good look at the Notes Designer Help database. Generally speaking, this database is rather well done and will help you with issues like Response Columns and view creation. If you have not yet checked it out, I strongly encourage you to do so.

Good luck,

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top