How to combine +two fields without submitting page (via AJAX/HTMLDB_Get)?

Hi all,
After my last contribution "Request for Scott Spendolini" I was able to create the scripts to update fields in forms without having to refresh the page. Thanks again to Scott, Carl and the others who helped me solving my problem.
I have another question regarding this however. How do I combine two (or more) values on a form to fill a field with the values, for instance to create a unique Primary-key field?
This is the example: combine the postcode and the house-number (and maybe an extension to the housenumber) in one field 'adrescode'. This uniquely identifies an adress in the Netherlands. I can 'get' the postcode to fill the first part of the adrescode, but how do I modify the scripts to 'get' the housenumber (huisnummer) and - if not left null - the extension to the housenumber?
Here are the scripts I created to far:
in the region source of the page I have the following Javascript:
<script language="JavaScript1.1" type="text/javascript">
function f_P52_getAdrescode ()
var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=P52_getAdrescode',0);
get.add('P52_POSTCODE',html_GetElement('P52_POSTCODE').value)
gReturn = get.get();
if(gReturn)
{  html_GetElement('P52_ADRESCODE').value = gReturn  }
else
{  html_GetElement('P52_ADRESCODE').value = 'null'  }
get = null;
</script>
and in the shared components of the application I have created an process P52_getAdrescode as follows:
declare
  l_adrescode varchar2(16);
begin
    l_adrescode := :P52_POSTCODE || :P52_HUISNR ;
    if :P52_HUISNRTOEVOEGING is null then
          NULL ;
    else
          l_adrescode := l_adrescode ||':'||:P52_HUISNRTOEVOEGING ;
    end if ;
    htp.prn(l_adrescode);
-- dbms_output.put_line(l_adrescode);
end;
I ran this PL/SQL in the SQL-section of HTMLDB and it does what a expect: combine the values in a new string.
In my page however, it only gets the value of postcode and puts this into the adrescode field.
So my question is: how do I modify the Javascript (I Guess) so that also the fields 'huisnummer' and 'huisnummertoevoeging' end up in the adrescode field?
Thanks for your help,
Jan.

Carl, Scott,
I have two pages with exact the same fields and codings (as described before in this Post.
I now have two different named functions and application processes, a javascript an process for each page. They both do the same thing, use the same code except for the page-number (:P52_ and :P92). I tried to make one process to replace both, but ran into problems when I changed the name in the get.add statement.
Changing the get.add from: get.add('P52_POSTCODE',html_GetElement('P52_POSTCODE').value) to: get.add('POSTCODE',html_GetElement('P52_POSTCODE').value) always ends up in what looks like a complete html-(source)dump of the page in the field that has to be updated. Even when I replace the :P52_POSTCODE in the application process as well Changing back the application process and the javascript to so that both javascript and process use the :P52_ again and the function returns the correct value again. What am I doing wrong?
I requested an online-workspace to post the application to it, but have no answer to my request yet, so I can't provide a working example at the moment....
Thanks for your help again,
Jan.

Similar Messages

  • How to update session state from form field values without submitting page?

    Hi,
    I am new to Oracle APEX. I am using Oracle Apex 4.2 on Oracle 11g release 2. The problem is that when I am entering data on a form, when I enter a value in one field and move to the next field, how can I use the value of first field in the validation procedure of next field? I know that when we enter data in fields, the session state is not updated with these values until we submit the page... right... but I have seen that if there is a control of List box type, then Apex gives an option "Action When List changes" where we can choose option to update corresponding session state field with the value of list box item, without submitting the page.
    Now my questions is why this option is only available for List box items? why not for other item types like Text box, Check box,... ? can someone please help me with this?
    (the issue with update of session state depending on page submitting, is that we need a complete network round trip from client to server in order for it. However if we can update session state variables without submitting page, then we can avoid this network traffic).
    Any help will be greatly appreciated. Thanks in advance.

    Create a dynamic action on change and run a PL/SQL process there with the following code:
    BEGIN
       NULL;
    END;Page items to submit > your item.
    This will set the session state without submitting the form.
    Further examples here:
    http://apex.oracle.com/pls/apex/f?p=31517:229
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to combine two datarows (business component data) in BI Publisher

    Hi ,
    We are using BI Publisher in Siebel Environment.
    We have data coming from two business components (like from 2 diff tables)
    a) <?for-each:ssTest1?>
    b) <?for-each:ssTest2?>
    ssTest1 and ssTest2 are the business components
    We need to combine these 2 datarows (a&b) and show the data into a single combined data row for ex like <?for-each:ssTest1ssTest2?> and show all the fields in that.
    I'm not sure how we can combine these two data rows into a single combined data row and show the data.
    Any help from any one would be apprecated.
    Thanks
    PV
    Edited by: user8633002 on Oct 21, 2010 4:05 PM

    Hi sajid
    There was nothing more description about your issue in this site and I found an issue below is mostly like yours
    http://www.codeproject.com/Questions/855487/how-to-combine-two-table-value-in-rdlc-report
    In the issue above, if you want to show the two other tables in the report, I think you could combine the tables into one datatable joining on key. The link below show an example of a DataSet Helper from Microsoft about combine DataSets. Take note of
    the related content for other DataSet Helper examples. And then you could use the datatable in your RDLC.
    # HOW TO: Implement a DataSet JOIN helper class in Visual C# .NET
    http://support.microsoft.com/kb/326080/en-us
    In an alternative way, I think you could create a view in the database which combine your tables and use it in your rdlc.
    In addition, your issue is about asp.net and you could get more support in the asp.net forum whose link as below.
    http://forums.asp.net
    Best Regards
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • How to hide mandatory field in OAF page through personalization

    Hi,
    Could u please help, that how to hide mandatory field in seeded page.
    This could be achieved through personalization only.
    Thanks,
    Ramachandra.
    Edited by: 927747 on Jun 21, 2012 2:16 AM

    yes you can hide that field by simply set the render propert to "false" using the personalization.
    Regards,
    Vijay Reddy.

  • How to combine two PDF files without consolidating form fields

    I have two PDF documents with form fields in each. Someone else created the documents. Certain fields were untitled and thus were given names as "undefined" in each document. However, some of those fields contain different information in each document. When i combine the document, these fields mix and incorrect information gets put into certain fields.
    For example, there is a blank field in doc A, titled "undefined." In doc B, there is a field with "johnson" titled "undefined." When I combine them, "johnson" appears in the blank field.
    Is there a way to combine the documents without combined fields?

    Is this the correct window I should see? I hit start and it said it was completed, but nothing seemed to happen.

  • How to combine two photos in one without white border?

    I am trying to combine two different photos next to each other (each 10 cm * 7.5 cm) in one of 10 cm * 15 cm and save it as a jpg file. Unfortunately when I do this in the print module (custom package) I get a file with a white border. I have set up page settings to 10*15 cm without border. How can I get a combined file without a border?

    Titas,
    This involves row level comparison of the report column data values we can achieve this in BI Publisher but at answers level there is no option.
    Thanks,
    Saichand

  • How to combine two pages (not files) into one long vertical page

    Is there a way in Acrobat 9 Pro to combine (concatenate) say two 8.5"x11" pages and create a single 8.5"x22" page?
    Right now I'm having to do this by importing one page into Photoshop, extending the canvas, and pasting in the second page into the extended canvas space.  Very kludgy. While this works, saving the resulting PDF (even after removing the option to preserve editability in Photoshop) still results in a file which is a whopping 2.5MB in size as compared with around 25KB for the original PDF file which was spanning 2 pages.
    Ultimately what I'm trying to do is to be able to view a long document which was created in MS Word 2007 and then saved as a PDF, in a web browser by scrolling, without having page breaks.  Trying to increase the page dimensions is MS Word 2007 prior to creating the PDF worked to a point but Word 2007's maximum page length is 22 inches and as luck would have it, the document requires about 23 inches in length.
    I've tried using the custom page setting under the crop tool in Acrobat 9 but I can't seem to get the modified page dimensions to be accepted.  Acrobat 9 seems to accept the input and then nothing changes with the page's dimensions.

    A simple way to accomplish the job, though not recommended is to print the 2 page file to a new PDF with multi-up (assuming you select vertical rather than horizontal locations) and adjust the paper in the Adobe PDF printer to be 8.5X22. At least you might give it a shot. Some variation, along with rotation possibly, might work.

  • How to compre two fields: one whith Decimal and other without decimal?

    Hi all,
    I am doing a file to IDOC scenario.
    In file strcture I have to compare two fields.
    ActiveHSCode and Decree166HSCode where
    ActiveHSCode comes with decimal values like for eg 1234.56.789.0 and Decree166HSCode comes with values like for eg 1234567890 or 4567891230 etc.
    I have to ignore decimal point from ActiveHSCode and compare with Decree166HSCode,
    If both of them are equal I have set ActiveIndicator as'Y' else 'N' and map this field to IDOC's field.
    How to achieve this?
    Please suggest.
    Regards,
    Sachi

    Hi,
    Since all the fields in mapping comes by default as a  string ....
    you first extract the value from ActiveHSCode using the string functions.
    Then compare the
    ActiveHSCode and  Decree166HSCode.
    Since u want to check only for the equality dont convert them to numbers.
    Directly check as a string.
    The code for extracting the value without decimal value is..
        String s = "12345.6789";   
        s=s.substring(0,s.indexOf(".")) s.substring(s.indexOf(".")1);    
        System.out.println(s);
    result:123456789
    Babu.

  • How to combine two reports in obiee 10g(not union)

    Hi Everyone
    I have got a requirement where client is asking to combine two report to one
    Report A has columns
    "Region", "category" ,"in house " ,"sales" which can be shown by applying filters for current running year
    Report B
    Region,Category, Week5,week6, week7,week8 in this showing sales in individual week by using pivot view and limiting to four weeks
    with a week filter
    Now client req is to combine both reports into single one
    region, category,inhouse,sales,week5,week6,week7,week8 here the issue is inhouse and sales data has show yearly data and week 5,week6,week7,week8 has to show weekly data .And weeks columns has to get updated automatically .
    I am having a confusion in this will it possible to combine both reports, if possible pls help out how to do it
    Regards
    Sandeep
    Edited by: Sandeep on Jul 31, 2011 9:20 AM
    Edited by: Sandeep on Aug 1, 2011 1:43 AM

    First of all, proof read your post. Generally, grammatical and punctuation errors can be deciphered, but where words are critical to presenting your issue clearly, you must type those sentences correctly. Otherwise, it can be confusing and turn off someone who may want to help.
    "...which can be shown without and filters and want data for current year." What does this mean?
    "...And weeks columns have to update its week no based on that week." What does this mean?
    In an attempt to answer you question, do this:
    1) Base your query filters on the "current running year." This will satisfy the requirements for displaying data from the first report.
    2) Now add 4 "sales" columns (i.e., same column, but 4 instances of it). In each of these columns, click on the fx button, click on Filters, go to your Time dimension and select the appropriate week, and then click "OK." Now, each of these columns will hold the measure value for the particular week while the "sales" column will have the "running total" for the whole time period.
    Once you get the above to work, you can work on automating this by substituting a function in place of the hard-coded week number values.

  • Sapscript: How to combine two elements into a block when display ?

    /E  ITEM_CONDITIONS
    /:   PROTECT
    ZC &KOMVD-VTEXT&,,&KOMVD-KWERT&
    /:   ENDPROTECT
    /E  TOTAL_AMOUNT_ITEMS
    /:   PROTECT
    ZC &KOMK-SUPOS&
    /:   ENDPROTECT
    Hi, all. May i know how to combine the two elements into a same block when displaying?
    That's mean this two element content will not be split into two part between two pages when there is insufficient space in the front page.
    Thanks.
    Edited by: Jiansi Lim on Oct 8, 2008 12:24 AM

    You can evoke the PROTECT..ENDPROTECT in the print program before the call of the text elements.
          CALL FUNCTION 'CONTROL_FORM'
            EXPORTING
              command = 'PROTECT'.
          CALL FUNCTION 'CONTROL_FORM'
            EXPORTING
              command = 'ENDPROTECT'.

  • Combining two tables without any distinct columns between them

    Folks,

    Hi sidy2j,
    According to your description, we need to verify your table structures, and the actual results which you want to get from your tables. Please post more information for analysis.
    Assume, if you want to a one to one record mapping between  two tables without any common column between them for joining, you can refer to the following scripts to implement your requirement. For more information, see:
    http://sqlhints.com/2013/09/07/joining-two-tables-without-any-common-column-between-them-sql-server/
    If you want to match every row in the first table with every row in the second table, you can refer to the following detail.
    http://stackoverflow.com/questions/1198124/combine-two-tables-that-have-no-common-fields
    Hope it can help you.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Does anyone know how to combine two apple ID's together?

    I have found out that I have two Apple ID's! One is for my apps on my iphone and the other is for iTunes.  Somehow they are set to different email addresses but are being sent to the same email address.  Does anyone know how to combine them, so I use just one Apple ID?

    This is my solution too.
      You see, what I also downloaded all the free apps I have on iPhone to this account I choose to use, so this way I didn't need to change accounts (of course it was on the iOS 5 times)

  • How to combine two dimension in dashboard??

    Dear experts,
    I have a requirement that i need two combine two dimension in dashboard.
    Ex:-
    -  I have two different providers (Query1 and Query2) and both is having common dimension called Plant.
    - The plant from both query is having different values (for example, Query1 Plant = A,B,C and Query2 Plant = D,E,F,G)
    - Now I want the total list of plants from both query and list of plants will be used as filter on combo box in dashboard.
    Note: List of values for Plant (dimension) may increase or decrease from both query.
    Thanks and regards
    Vijay Muniraj

    Hi Vijay,
    How can you combine the 2 queries as a single query in dashboard?If i understood the query,use a Multiprovider for your requirement and get the combined results in single query and use Plant as single prompt in the dashboard(If you are getting data from BI).You cannot merge this behaviour in the dashboard.(In Web Intelligence you can merge it based on common dimension values only).
    Regards,
    Venkat

  • How to combine two 8 bit numbers to make a 16 bit number??

    Hi
    My electronics ADC ouputs the result of the conversion over two bytes because it is a 10 bit number. This is then fed into Labview via the serial port. I have the two bytes stored in the various elements of an unbundle block diagram.
    My current vi has the two bytes stored seperately. HOw may I combine the two together??
    So far I have
    1st byte sent : (MSB)bit7/bit6/bit5/bit4/bit3/bit2/bit1/bit0(LSB)
    2nd byte sent : (MSB)X/X/X/X/X/X/bit1/bit0(LSB)
    I can send the two bytes from my electronics in either order, whichever suits labview the best.
    At the present time, byte 1 max value is 255 and byte to is 3
    I would like to combine these two arrays to form the following:
    (MSB)X/X/X/X/X/X/bit9/bit8/bit7/bit6/bit5/bit4/bit3/bit2/bit1/bit0(LSB)
    This way, the combined two bytes has a range up to 1048, a true representation of the ADC value. This value can then be converted and displayed on a dial.
    If anybody has any ideas or help it would be appreciated. I can attach a vi to explain what I am doing if that helps/or my details above are unclear.
    Thanks

    Sign extention of a 10 bit integer. Input two bytes, Output signextended 10 Bit. The output value will be in the range from -512 to 511. No check if Highbyte is greater than 3!
    Code in LV 6.0.2
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions
    Attachments:
    SignExtend10Bit.vi ‏17 KB

  • How to place aggregated fields in the page header or group header

    Hi,
    i have a report where in i have to display a header based on the aggregated value of a field
    currently the field has values like
    row1  blank
    row2  blank
    row3 Cookies
    row4 blank
    I wanted to know how to get the maximum of these rows in the page header i.e. it should come as Cookies for this case.
    Is there any way to get this? it is easy in the footer where i can do a maximum of this field and get the value but not sure how to get this in the group header.How do we group maximum at the page header or group header?
    Require your help on this at the earliest.
    Thanks
    Shilpi

    Hi Shilpi,
    >
    Shilpi Sinha wrote:
    > currently the field has values like
    > row1  blank
    > row2  blank
    > row3 Cookies
    > row4 blank
    >
    Do display these things in a subreport(i mean adda subreport in detail section). And Create a formula in the subreport itself with shared varible for assiging  the maximum value ..
    Then in the main report , create one formula with same shared variable and just display in Header secton..
    Regards,
    Salah.

Maybe you are looking for