This discussion is archived
2 Replies Latest reply: Dec 11, 2012 3:41 AM by jariola RSS

How to use computation with concatenation

Vedant Explorer
Currently Being Moderated
Dear All,

i have 7 checkbox with days name and days return value are
MON-1
TUE-2
WED-3
THR-4
FRI-5
SAT-6
SUN-7


I want to insert value of these item into one column when i create new record.
so i have use computation to do this but it take only single item return value.

i have used
computation type=ITEm VALE

Computation Source

P5_MON||P5_TUE||P5_WED||P5_THR_P5_FRI||_P5_SAT||_P5_SUN

After submit , unconditional

how to insert these checkbox value into one column into table using concatenation.


How can i do this.

Thanks
  • 1. Re: How to use computation with concatenation
    Paul Broughton Pro
    Currently Being Moderated
    Hi Vedant,

    Its still a little unclear to me what your trying to do and the format that you are trying to save the values in. You also haven't stated which version of APEX you are using.

    Are you trying to save into one column in a format 1234567

    If so to concatenate try using:

    :P5_MON||:P5_TUE||:P5_WED||:P5_THR||:P5_FRI||:P5_SAT||:P5_SUN

    An Alternative approach to using a computation would be to create a page process that fires after submit such as:
    begin
      insert into days_tbl(days_val)
      values(:P5_MON||:P5_TUE||:P5_WED||:P5_THR||:P5_FRI||:P5_SAT||:P5_SUN);
    end;
    
    This is based on a table called days_tbl and a column called days_val.  You will need to change this to your needs.
    
    Hope this helps.
    
    Paul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
  • 2. Re: How to use computation with concatenation
    jariola Guru
    Currently Being Moderated
    Vedant wrote:
    i have used
    computation type=ITEm VALE
    Hi,

    You can not use computation type "Item Value" to get value from multiple items.

    Regards,
    Jari
    -----
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points