@Dblookup and formatting on web

时间:2017-04-10 03:28:48

标签: lotus-domino lotus

I have been developing a web application using domino, therein I have dblookup-ing the field from notes client; Now, this is working fine but the format of value is missing while using on web.

For example in lotus notes client the field value format is as above

  1. I am one, I am two, I am one , I am two, labbblallalalalalalalalalalalalalalalalalalaallllal
  2. Labbbaalalalallalalalalalaalallaal
  3. Hello there, labblalalallalalalllaalalalalalalalalalalalalalalalalalalalalalalala

Now when I retrieve the value of the field on web it seems it takes 2 immediate after 1. and so forth, I was expecting line feed here which is not happening.

The field above is multi valued field. Also on web I have used computed text which does db lookup from notes client.

Please help me what else could/alternate solution for this case.

Thanks HD

2 个答案:

答案 0 :(得分:1)

您的多值字段具有与之关联的显示选项,Notes客户端会尊重这些选项。显然,您的选项设置为显示由换行符分隔的条目。

您用于网络的计算文本没有这样的选项,并且字段选项无关紧要,因为您没有显示该字段。您的代码必须插入@Newlines。这很简单,因为@DbLookup返回一个列表,如果你连接一个列表和一个标量,标量将被附加到列表的每个元素。 (看看&#34下的第三个例子;连接,成对" here看看我的意思。

您提出问题的方式对我来说有点不清楚,但您在计算文本公式中需要的是这样的:

#include <stdio.h>
#include <stdlib.h>

int main (void) {   /* you don't use any argument, use void */

    int *array, *p, r, c, sum = 0;  /* declare, initialize variables */

    printf ("enter number of rows: ");
    if (scanf ("%d", &r) != 1) {    /* alway validate ALL input */
        fprintf (stderr, "error: invalid row value.\n");
        return 1;
    }

    printf ("enter number of cols: ");
    if (scanf ("%d", &c) != 1) {
        fprintf (stderr, "error: invalid column value.\n");
        return 1;
    }

    /* allocate & VALIDATE */
    if (!(array = calloc (r * c, sizeof *array))) {
        fprintf (stderr, "error: virtual memory exhausted.\n");
        return 1;
    }
    p = array;  /* assign array to pointer */

    for (int i = 0; i < r; i++)         /* nested loops used to initialize */
        for (int j = 0; j < c; j++)
            array[i * c + j] = i + j;   /* assign i + j to correct offset */

    for (int i = 0; i < r * c; i++, p++)  /* separate loop to walk the array */
        sum += *p;                        /* sum values using pointer */

    printf ("The sum is : %d\n", sum);

    free (array);   /* if you allocate it, track it and free it when done */

    return 0;
}

或类似的东西:

list := @DbLookup(etc,. etc.);
list + @Newline;

答案 1 :(得分:0)

我使用了@implode(Dblookupreturnedvalue;&#34;
&#34;);

感谢所有人:)