Announcement

Collapse
No announcement yet.

How to make space on Lookup in Form

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to make space on Lookup in Form

    I am looking for this solutions for few months, but I did not succeeded - please help.


    So, when I make
    Data Type: Select
    Lookup Method: Automatic

    and I have something like that:
    SELECT idDoc, sc_concat(idDoc, Name)
    FROM Doc
    ORDER BY idDokumentiMape, OznakaMape

    I get result like: 645NameOfIt

    but I want to get nice look, like: 645 NameOfIt

    I want space between two fields. How to achieve that?

    Thank you for your help!


  • #2
    Hello mitja ,

    Looks like a MySQL query, so try this:

    Code:
    SELECT idDoc, concat(idDoc, ' ', Name) as id_with_name
    FROM Doc
    ORDER BY idDokumentiMape, OznakaMape
    Oracle way:

    Code:
    SELECT idDoc, (idDoc || ' ' || Name) as id_with_name
    FROM Doc
    ORDER BY idDokumentiMape, OznakaMape
    Notice that I am using native concat function from db. I do not know why SC reinvent the wheel.
    Last edited by manfred; 05-01-2016, 09:37 PM.

    Comment


    • #3
      Partly correct except that you should use the sc macros. So it would be:

      SELECT idDoc, sc_concat(idDoc, ' ', Name)
      FROM Doc
      ORDER BY idDokumentiMape, OznakaMape
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment

      Working...
      X