String based on another string

I wish I had a string 'A' which is one function of another a 'B '.
In practice, if the length of B is equal to or less than some number N, the value of A is equal to B.
However, if the length of B is greater than N, then the value of A is the first characters of N of B more chain: «...» ».

I know that I could add a listener for changes on B to recalculate the value of a all the time, but I wonder if there is a simpler way to do this?

I think that string missing a lengthProperty would be required for a connection based solution, then probably you will need to use a ChangeListener.

You can create a query for a lengthProperty for string if you wish:
https://JavaFX-JIRA.Kenai.com

Tags: Java

Similar Questions

  • Display list items based on another element of the list

    Hi all

    I want to display the list item based on another element of the list, but his does not work.

    This is my code:


    / * WHEN-NEW-FORM-INSTANCE * /-his work.
    DECLARE

    rg_district recordgroup;

    rg_name VARCHAR2 (40): = "district";

    vtemp NUMBER;

    BEGIN

    rg_district: = FIND_GROUP (rg_name);

    IF ID_NULL (rg_district)

    THEN

    rg_district: =.

    CREATE_GROUP_FROM_QUERY (rg_name,

    'select dist, dist district_mas.

    );

    vtemp: = POPULATE_GROUP (rg_district);

    POPULATE_LIST ('BLOCK3.) Of RIDING ", rg_name);

    END IF;

    END;

    * / CHANGED AFTER a - list * /-does not work. Cannot complete the list based on the list

    DECLARE

    rg_branch recordgroup;

    rg_name1 VARCHAR2 (1000): = "branch";

    vtemp NUMBER;

    BEGIN

    rg_branch: = FIND_GROUP (rg_name1);

    IF this is ID_NULL (rg_branch)

    THEN

    DELETE_GROUP (rg_name1);

    rg_branch: =.

    CREATE_GROUP_FROM_QUERY

    ("rg_branch",

    "SELECT FROM dist_branch WHERE district IN branch (DIST DISTRICT_MAS WHERE DISTRICT = SELECT').

    || : BLOCK3. DISTRICT OF

    );

    vtemp: = POPULATE_GROUP (rg_branch);

    POPULATE_LIST ('BLOCK3.) Branch of THE ', rg_branch);

    END IF;

    END;

    Table:

    CREATE TABLE DISTRICT_MAS

    (

    DIST VARCHAR2 (100 CHAR)

    );

    CREATE TABLE DIST_BRANCH

    (

    NEIGHBORHOOD VARCHAR2 (100 CHAR),

    DIRECTORATE GENERAL OF THE VARCHAR2 (100 CHAR)

    );

    Values:

    insert into district_mas values ('chennai');

    insert into district_mas values ('coimbatore');

    insert into dist_branch values ('chennai', 'chennai_north');

    insert into dist_branch values ('coimbatore', 'Podanur');


    Concerning

    Nassik M

    I tested the code below when the list has changed


    DECLARE

    rg_branch recordgroup;

    rg_name1 VARCHAR2 (1000): = "branch";

    vtemp NUMBER;

    QT VARCHAR2 (10): = "';

    BEGIN

    rg_branch: = FIND_GROUP (rg_name1);

    IF this is ID_NULL (rg_branch)

    THEN

    DELETE_GROUP (rg_name1);

    END IF;

    rg_branch: =.

    CREATE_GROUP_FROM_QUERY

    (rg_name1,

    'SELECT branch, branch OF THE DISTRICT WHERE the dist_branch =' | QT | : BLOCK3. DISTRICT OF | QT);

    vtemp: = POPULATE_GROUP (rg_branch);

    POPULATE_LIST ('BLOCK3.) Branch of THE ', rg_branch);

    END;

    Hope it's work...

    Hamid

  • How do column filter based on another column

    In my report, I have column a thru d. I would like to create a filter based on another column where column is column B. I can enter a value that the column cannot be equal to, but I would use a column instead of a value.

    Thank you.
    Jonathan

    Try this: icon on the filter columns->-> convert this advanced filter for SQL
    You can reference any other column

    BTW: Have you had a chance to look at my suggestion for your post
    Tables from a Table

  • Choose field from the joined table based on another field?

    Hello!

    Is it possible to select a field in a row of attached table based on another field? Consider the following data in the CVALUES table:
    ID  C1   C2    C3    C4    C5    C6
    T1  9.6  10.3  12.4  19.6  19.6    0
    T7  9.6  10.4     0     0     0    0
    T3  8.2   9.9  11.4  19.6  19.6    0
    T8  8.3  10.7  13.5  20.7     0    0
    T5  9.4  10.3  12.7  22.9  19.6    0
    ...
    And the following data in the table MDETAIL:
    ID           MDATE        CNUM     ...
    T1  03/28/2012 18:00:00    4
    T1  03/28/2012 18:00:00    1
    T8  03/29/2012 06:00:00    6
    T8  03/29/2012 06:00:00    5
    ...
    I want to get the column corresponding to the VALUE field in the table MDETAIL CVALUES. I'm doing this:
    SELECT m.t1, m.mdate,
           CASE WHEN m.cnum = 1 THEN c.c1
                WHEN m.cnum = 2 THEN c.c2
                WHEN m.cnum = 3 THEN c.c3
                WHEN m.cnum = 4 THEN c.c4
                WHEN m.cnum = 5 THEN c.c5
                WHEN m.cnum = 6 THEN c.c6 END AS cvalue
      FROM mdetail m
      JOIN cvalues c ON m.id = c.id
    The CVALUES table records are unique; only one line by ID.

    This method works and it's fast, but it's messy code and I think there must be a better way to do it. I use cvalue value in several calculations so each calculation that I use is this giant glob of CASES inside!

    Hello

    With a decoding it would be easier, but as ugly :-)

    SELECT m.t1, m.mdate,
           DECODE( m.cnum , 1 , c.c1, 2, c.c2, 3, c.c3, 4, c.c4, 5, c,c5, 6, c,c6) cvalue
      FROM mdetail m, cvalues c
      WHERE m.id = c.id
    

    Success!

    FJFranken

  • Delete based on another column dublicate records

    How can I remove duplicate records, based on another column.

    the table structure
    CREATE TABLE IA_EXPORT_LEVEL
    (
    A_NO VARCHAR2 (22 BYTE),
    IM VARCHAR2 (18 BYTE),
    ctn_level NUMBER (2)
    )

    reviews
    A_NO IM ctn_level

    S1 S1 1
    S1 M1 2
    S1 h1 3
    H2 S2 1
    S2 h2 2
    S3 h1 2
    S3 h1 3
    S4 h6 4
    S4 h6 5

    I want to delete all records other than the minimum value of the ctn_level

    output should like below
    S1 S1 1
    H2 S2 1
    S3 h1 2
    S4 h6 4

    Published by: OraFighter on December 16, 2011 13:44
    DELETE FROM IA_EXPORT_LEVEL where rowid IN
    (select rid from
    (select rowid rid, row_number() over (partition by A_NO,IM order by ctn_level) rn from IA_EXPORT_LEVEL )
    where rn > 1 )
    /
    

    Hope your question.

  • BC4J editable attribute based on another attribute

    Hello.

    Is it possible to define updatable (read-only) on BC4J, based on another column. For example if attribute a == true which attribute the (Always) b.setUpdatable of other b.setUpdatable (Never). By definition, changing Updatable property to EO/VO for each line is an absurdity. Or not?
    I know how to do it on ViewController (set ReadOnly property expression EL provided you attribute a different value) but don't know how to do (if it is possible) on model?

    THX

    Concerning
    Zmeda

    zmeda,

    You can override isAttributeUpdatable() on your EntityImpl or ViewRowImpl classes

    John

  • Get the cumulative values in a single column based on another column in reports

    Hi all

    I have a requirement to get cumulative values based on another column.
    I 'Sales rep name' in the first column.
    Correspondent "Values of the invoice line" in the second column.
    Want to have cumulative of all the values for each sales invoice line.
    Then apply rank and display the top 10 sales reps based on invoice lines.
    Since there is no rank option in the PivotTable, I do this in the report table.

    Looking for the best entries...

    Thanks in advance...

    Try below
    2nd column: "name of Sales rep.
    column 2: SUM ("invoice line values ' BY 'Name of Sales rep'") and sort this field desc.
    3rd column: fx RANK (SUM ("invoice line values" BY "Sales rep name")), to hide this column, so that you don't confuse your users.

    and put the filter on the 3rd column below 5

    I hope this works for you

  • Make a mandatory DFF field based on another field

    Hi all

    We have a requirement where we need to do a mandatory DFF field based on another field.

    example:

    FDF has two fields:

    Depose1: the values 'Email', 'Fax '.
    Depose2

    If "Email" is selected in 'Field1' Field2 should become mandatory.

    All entries on this will be really useful.

    Thank you and best regards,
    Satya.

    Please see old topics that cover the same subject - http://forums.oracle.com/forums/search.jspa?threadID=&q=DFF+AND+mandatory+ANd+Dependant&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001

    Thank you
    Hussein

  • loop chart - the chart is based on another query

    I'm working on a report of BI Publisher. The report displays information for a list of stores (store group, by store - each store page break is a page). Now, we want to add a chart (weekly sales - group per week) for each store, we know there is "table within the group" box, we can use, but our problem is that the chart is based on another query, not the original group by query parent store. Could you please help? Detailed information can be provided if required.

    Please check your Inbox.
    I sent you the answer.

    See you soon

    Jorge
    p.s if this answers your question please give the points and close the message

  • Update of the table based on another

    Hello

    I'm trying to update a date column in a table based on another table. There is a unique ID in each table that identifies and connects each person:
    update patient_bu a set a.entry_date = (select b.entry_date from CLIENT_MED_DT b where a.id = b.id)
    This is the error:

    ORA-01427: einreihig subquery returns multiple rows


    The problem (I think) is that the select statement back several dates for records people. There are some people / records that have multiple entry dates, but I'm only interested in the most recent date.

    How can I update this table with only the most recent date?

    Thanks for any help,
    Matt

    Oh well, I forgot the UPDATE clause:

    SQL> create table patient_bu
      2  (id number
      3  ,entry_date date);
    
    Table created.
    
    SQL> create table client_met_dt
      2  (id number
      3  ,entry_date date);
    
    Table created.
    
    SQL> merge into patient_bu a
      2  using (select id
      3               ,max(entry_date) max_date
      4         from   client_met_dt
      5         group  by id
      6        ) b
      7  on    (a.id = b.id)
      8  when  matched then update
      9        set a.entry_date = b.max_date;
    
    0 rows merged.
    
  • How to get the print page numbers in a report based on another report

    Hello


    I have a requirement in which I need to print the page based on another report number
    example my game application has 3 reports

    1 report prints the pages 1-100
    Report page no. 2 should start from 101 to 110
    3 report 111-

    Can someone make me please how to do this?

    THX in advance
    Kumar

    Hello

    You can create all report queries three in a single report, create a separate query in the data model and then create the layout in the proper sequence as required.

    If you want to use separate reports only you can try the following:

    In the first report, use the shutter release after report and record the total number of pages of a table as a record.

    In the second report, extract the value stored in the table and add it to the Page No. to get the Page number for the second report.
    Also in the second report use the shutter release after report and update the record created first in the total number of pages + total number of pages of the first report.

    In the third report to extract the value stored in the table and add it to the Page No. to get the Page number for the third report.
    Don't forget to delete the folder created in the trigger after the third report table report.

    I hope this helps.

    Best regards

    Arif Khadas

  • Default value for the prompt based on another request

    Hello:

    I have a requirement where I need to define default values of messages based on another request.

    The guest is a quick Date.

    I have tried using the presentation variable and sql query writing, where is written "WHERE promo_id = @{variable}" "

    but it still does not.

    Please let me know a workaround for this problem.

    Thank you.

    -Vinay

    What determined your operator BETWEEN End Date? I guess it's variable. In addition, is the second report on the same page or another page of dashboard? Assuming that the two reports are on the same page, do the below. If this isn't the case, you can use the same guests on the second page of dashboard. Define the scope of "dashboard" and the selection of the user is wearing on the second page.

    The easiest way is to have 3 guests of dashboard: Promo_ID, Start_Dt and end_date. assign to these guests PVs: pvPromoID, pvStartDate and pvEndDate, respectively.

    Filter a report on pvPromoID and pvStartDate.

    The second report on the pvPromoID of the filter and use pvStartDate in the filter of the two report Date column. Assuming that the values BETWEEN are variable, so you can write the following on the column of your second report:

    "Table name". " Date ColumnName.<= '@{pvstartdate}'="" and="" table="" name"."date="" column="" name"=""><>

    And your Promo column, use the filter "Table name". "Class = ' @{pvPromoID}"

    When the user selects the Promo ID, Start Date and end Date in the guests, the first and second reports will be filtered accordingly.

  • best way to create a table based on another table

    Hello
    I am trying to create a table based on another table with all the data in it. It contains important data.

    create table < tablename > select * from table1.

    Is the best way to do it, or is there another way. Please advice.

    Thank you

    Insert / * + append * / in as select * from ;

    It should be->

    insert /*+ append */ into 
    select * from ;
    

    Kind regards.

    LOULOU.

  • Tabular presentation - column to turn it off (with picture) based on another value of the column

    Hi all

    I haven't worked much on tabular forms and JS. I'm looking for help in this regard.

    I'm working on a tabular presentation. with several editable fields... I need to disable a column (just for this single line), which contains an image, based on a field of LOV (static) list) (Y/N). The image column must be disabled if the value is N.

    My SQL for the report is something like this: (will keep things simple)

    Select

    emp_id,

    emp_name,

    static_list,

    (case when STATIC_LIST = "Y" THEN ' < a title = "Edit SAMPLE TBL" href = "f?) p = & APP_ID.:10: & APP_SESSION.:NO:P10_EMP_ID, P10_EMP_NAME :'|| EMP_ID | «, » || EMP_NAME | "" "> < img src =" "#IMAGE_PREFIX #SAMPLE.gif" border = '0' (> < /a > ' other ' ' end) as disable_col, "

    dept_name

    of sample_table

    I scoured the topics in this forum. Most of them were made using the table ID f_001, f_002.

    I tried to follow the same path by inspecting the item but the disable_col does not have any ID.  Let's say, f_003 is for the static list and f_004 is assigned to dept_name.

    I tried dynamic actions, but it did not work. Read in a topic that dynamic action does not work on tables. So I chose this approach. Is there a simpler way to solve this?

    need your help on how to proceed with this scenario. Thank you in advance.

    Versions: Apex: 4.2, DB: 11 g

    Thank you

    Daniel

    Hi Daniel_A,

    Daniel_A wrote:

    I did my job in Page 4.

    If the IS_VALID column is select as 'Yes' then the column hyper must be enabled, allowing the user to click on it. If she chose the 'no', then the column Hyper must be disabled for this line.

    The initial question about toggle the hyperlink is resolved. Check your App-> Page 4 35160.

    This is done with the help of two dynamic actions:

    • DA first loading of the Page / after updating of region "tabular":

    Event: After refresh

    Selection type: region

    Region: The other 'tabular '.

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: Yes

    Code:

    $( 'select[name="f08"]' ).each(function() {
      if ( $(this).val() === "N" ) {
        $(this).closest("tr").find('td[headers="HYPER"]').find("a").addClass("apex_disabled").unbind("click");
      }
    });
    

    Items concerned: no item affected

    • Second DA on the evolution of the selection list:

    Event: change

    Selection type: jQuery Selector

    jQuery Selector: select [name = "f08"]

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: No.

    Code:

    var el = this.triggeringElement;
    if ( el.value === "N" ) {
        $(el).closest("tr").find('td[headers="HYPER"]').find("a").addClass("apex_disabled").unbind("click");
    } else {
        $(el).closest("tr").find('td[headers="HYPER"]').find("a").removeClass("apex_disabled").bind("click");
    }
    

    Items concerned: no item affected

    NOTE: as the original question/topic related to toggle the image link in the column, for the problem with the Page 5, please create a new thread with the details.

    Kind regards

    Kiran

  • How to set the default value for a selector to display based on another analysis

    Hello

    I have a requirement where I have to choose a different opinion to an analysis based on the data from the analysis. More specifically, I have a bar graph that must adapt to the view that is appropriate for the data that the user seeks to (according to the instructions of the dashboard).  A few times, the user can focus on two weeks of data and it's OK to see 14 bars in the bar chart (one for each day), but when the user is looking at a value a year of data, the data should be grouped by month.   I've seen for each that look good and the view selector works.  My problem is that I need reviews to be selected without the user to search through the view selector drop-down.  I also have the logical case (in a separate analysis of the same dashboard) who says what the best view of the user.

    How can I programmatically change what view of the picker view is presented to the user?

    Justin W. Steigerwalt

    ADT Security

    (404) 759-1971

    [email protected]

    My solution for this is to count the number of "," in the prompt value.

    The calls to set a variable of presentation and I just have to count the number of commas in the value of the variable of presentation. When you select several entries of the presentation variable is a simple comma-separated list.

    How to count commas? The shortest path was provided by Christian Berg (I was doing it less "optimally"): length - LENGTH (REPLACE (string, ',' ")) + 1

    If your guest set a presentation named "pv_week" the formula variable is: LENGTH('@{pv_week}{-}') - LENGTH (REPLACE (' @{pv_week} {{}}', ',' ")) + 1

    Then just use it in the CASE WHEN (attention to the always return the same type of data, so if the granularity of weeks and months is VARCHAR, the granularity of the day must be also a VARCHAR and not a DATE, you must CAST to avoid problems).

Maybe you are looking for

  • How to change the date in the media browser?

    I had to take additional steps to get this media in FCPX - because of these additional steps, the date, that the images were shot in fact was replaced by date (today) that I had to do an additional image transcoding. I want to change the files under

  • "Security alert" Apple - iPad legitimate?

    Seems a bit scammy. But Safari is permanently blocked and set again and can not be used - at least until I hit a button 'OK' at the bottom of the screen - something I'm hesitant to do until I know more. When the woman returned to tell me his ID, I'll

  • How can I make a graphic descrete webform curve?

    I have a webformgraph to show a curve with 1 hourdata every second, which means they have 3600 points to show. He readsthe data in a file. When there is a missing value, I replace theby-1 point value. Thus, it shows the fall of the curve of the base

  • first derivatives

    Y at - it an equalivent function LabWindows/CVI for the LabView NI_AALPro.lvlibderivative x (t) .vi?  I noticed that he ends up in a library function call "Derivatives85" in the lvanlys.dll. I need to find the transition point where the slope is goin

  • Error number: 0x8024402F

    I can't run Windows Update.  It shows "error number: 0x8024402F»  That's happened?