Merge or combine or union views

hi, i have a db containing some information regarding a product and lagnuages and dates for each language.

i can create a view that gives me the information for each language, for example

select @contains french “y”

and this view displays the dates releveant for the french language.

i have the same views for other languages and that is all working fine.

now my problem, is that i would like to have an overview of all my languages, meaning i would like to be able to see results for all the views in one view, instead of going to each view and then copy/paste the info somehwere else.

Basically like a union of queries in query language.

i have looked on the forums and in the help, but could not find an answer that was helping. My database (well a form in LN) is not in db2, so i do not think i can use the db2 options thta i have found in help.

i have setup all my fields in one form, for example:

french, date1_french, date2_french…

german, date1_german, date2_german

and so on for all the languages

thanks in advance for any help…

Subject: Merge or combine or union views

How about this: Your selection formula would be form = “name of your form”.

The first column would be language (I would probably categorize that one).

2nd column:

@If(language = “french”; date1_french; language = “german”; date1_german; (and so on until you reach your last); “”);

3rd column:

@If(language = “french”; date2_french; language = “german”; date2_german; language = “portugese”; date2_portugese; “”)

Unfortunately, you will have to specify each language and each date. Depending on how many if statements you have to write, it might slow down things a bit.

Will this work?

Subject: RE: Merge or combine or union views

hi Sam,

i will give it a try, but i think there might be a problem, with the languages, one entry in the table can have more than one language, so the @if might not give the expected results… i will give it a try and see, i am not an expert in these fields.

Meaning entry1 can have language fr=‘y’ and the according dates, but also german =‘y’ and the corrsponding dates.

but i will try and post back to let you know, thanks for the help

Subject: RE: Merge or combine or union views

hi Sam,i tried and it does what i expected, if an entry has many language values, it only displays the first one that fits the if condition.

i am thinking of making a loop to look at all the data and putting it in different arrays, but this will probably really slow the database when there is a lot of information in the table.

unless someone has another idea?

why can’t we do a simple union, or how, i seem to not have found anything for that?

Subject: RE: Merge or combine or union views

Thierry, your problem is surely solvable in Notes (without loops). There’s not even a need for an equivalent to union, because all the data you need is not spread over multiple tables, but physically stored in one document. A document can be roughly compared with a record in a table.

Unfortunately it is still not clear to me, how your fields are organized. What exactly do you mean when you say “entry has many language”? Do you have documents (generally displayed as one row in a view) that simply have all the fields you’ve mentioned in your example? If so, are there documents that only contain information for a subset of all available languages?

N.B.

Of course, a database is called a database in Notes (or application, when following Notes 8 naming conventions), not a from. A form is what is used to create and display documents through the user interface.

Subject: RE: Merge or combine or union views

hi Harkpabst,here is how my database is setup:

i hav documents that can be translated in one or many languages, and with due date for each translation, so i created fields for all of this:

document name

translation french (y/n)

due date french

actual date french

translation german (y/n)

due date german

actual date german

etc for all other languages

now i would like to see one view that has in different rows (and that is the hard part) for each document/language combination the whole information:

document1 french due date french actual date frenc

document1 german due date german actual date german

document2 german due date german actual date german

etc…

some documents can be translated in some languages or not

i have no problems creating a view for each language, that is very easy, but the problem arises when i try to get all the languages together in one view as shown above.

i managed to get some data together by using one column that combines some information (document1:language), but i get strange results and if i had to add dates then it would get confusing. there must be an easier way.

i thought about a relational db with a table for each document and one table for each language data, but have no idea how i would create this in LN or how i would query it also.

i used a page and imbeded views, which is as close to what i want to get:

in the page;:

imbed view french

imbed view german

but then i cannot select all the data at the same time, i have to go view by view if i want to copy/paste the data view by view (instead of all the content together) to send the results in excel or via mail

so basically the page as described above work for viewing the info, but not for working with it.

i hope i made this a bit clearer

thanks!!!