Creating a dynamic column editable

I tried to make my dynamic columns as editable. The problem is that my dynamic columns are nested.

Now editable column works fine when I have diff columns with a different name. For example, col1, col2, col3 (not nested)

Or I nested columns like "pass"(parent) given two columns col1 and col2. ".

But, when I use them in a dynamic of columns in which all of them have the same name, in the example below, each with the same name 'col', I can change all of them, but the textfield never faded away, when I click on ENTER.


Suppose I have an editable column with col name:
for (final CategoryTypeVO type : typeList)
                {
                       TableColumn<ItemVO, Integer> col = new TableColumn<ItemVO, Integer>(type.getTypeName());
                      col.setMinWidth(100);
                      col.setEditable(true);
                      col.setCellFactory(cellFactory);
                     
                     
                      col.setOnEditCommit(
                               new EventHandler<TableColumn.CellEditEvent<ItemVO, Integer>>() {
                               public void handle(TableColumn.CellEditEvent<ItemVO, Integer> t) {
                               ((ItemVO)t.getTableView().getItems().get(
                               t.getTablePosition().getRow())).getListType().get(type.getTypeId()).setQuantity(t.getNewValue());
                               }
                               });
                       quantity.getColumns().add(col);
                     }
and cellfactory as:
final Callback<TableColumn<ItemVO, Integer>, TableCell<ItemVO, Integer>> cellFactory = new Callback<TableColumn<ItemVO, Integer>, TableCell<ItemVO, Integer>>() {
                    public TableCell call(TableColumn p) {
                         return new EditingCell();
                    }
               };
and Editing class as
class EditingCell extends TableCell<ItemVO, Integer> {
           
           private TextField textField;
          
           public EditingCell() {}
          
           @Override
           public void startEdit() {
               super.startEdit();
              
               if (textField == null) {
                   createTextField();
               }
              
               
               setGraphic(textField);
               setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
               textField.selectAll();
               Platform.runLater(new Runnable() {
                   @Override
                   public void run() {
                       textField.requestFocus();
                   }
              });
           }
          
           @Override
           public void cancelEdit() {
               super.cancelEdit();
              
               setText(String.valueOf(getItem()));
               setContentDisplay(ContentDisplay.TEXT_ONLY);
           }
      
           @Override
           public void updateItem(Integer item, boolean empty) {
               super.updateItem(item, empty);
              
               if (empty) {
                   setText(null);
                   setGraphic(null);
               } else {
                   if (isEditing()) {
                       if (textField != null) {
                           textField.setText(getString());
                       }
                       setGraphic(textField);
                       setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
                   } else {
                       setText(getString());
                       setContentDisplay(ContentDisplay.TEXT_ONLY);
                   }
               }
           }
           
          
           
      
           private void createTextField() {
               textField = new TextField();
               //textField.setText(getString());
               textField.setText("0");
               textField.setMinWidth(this.getWidth() - this.getGraphicTextGap()*2);
               
               textField.focusedProperty().addListener(new ChangeListener<Boolean>() {

                      @Override
                      public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2) {
                          if (!arg2) {
                              commitEdit(Integer.parseInt(textField.getText()));
                          }
                      }
                  });
               
               textField.setOnKeyReleased(new EventHandler<KeyEvent>() {
                   @Override public void handle(KeyEvent t) {
                       if (t.getCode() == KeyCode.ENTER) {
                           commitEdit(Integer.parseInt(textField.getText()));
                       } else if (t.getCode() == KeyCode.ESCAPE) {
                           cancelEdit();
                       }
                   }
               });
           }

          
           private String getString() {
               return getItem() == null ? "" : getItem().toString();
           }
Now what happens is this thing works fine if I separate columns with distinct names. But when it comes to dynamic columns, it fails, once I have edit a cell, the text field never leaves his place. It gets stuck in the cell. Any help!

Published by: abhinay_a on January 21, 2013 12:31 AM

Do not know what is the problem in your code, but it is easier to use TextFieldTableCell than building your own TableCell from scratch.

This change to the example I posted in How to create a tableview for this? works for me:

package itemtable;

import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.Scene;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableColumn.CellDataFeatures;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.control.cell.TextFieldTableCell;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
import javafx.util.Callback;
import javafx.util.converter.NumberStringConverter;

public class ItemTable extends Application {

  @Override
  public void start(Stage primaryStage) {
    final DAO dao = new MockDAO();
    final ChoiceBox choiceBox = new ChoiceBox();
    choiceBox.getItems().setAll(dao.getCategories());

    final TableView table = new TableView();

    // Make table editable:
    table.setEditable(true);

    final TableColumn nameCol = new TableColumn("Name");
    nameCol.setCellValueFactory(new PropertyValueFactory("name"));
    nameCol.setCellFactory(TextFieldTableCell.forTableColumn());
    final TableColumn priceCol = new TableColumn("Price");
    table.getColumns().addAll(nameCol, priceCol);

    choiceBox.getSelectionModel().selectedItemProperty()
        .addListener(new ChangeListener() {
          @Override
          public void changed(ObservableValue observable, Category oldValue, Category newValue) {
            table.getItems().clear();
            priceCol.getColumns().clear();
            for (final Type type : newValue.getTypes()) {
              final TableColumn col = new TableColumn(type.getName());
              col.setCellValueFactory(new Callback, ObservableValue>() {
                @Override
                public ObservableValue call(CellDataFeatures cellData) {
                  Item item = cellData.getValue();
                  if (item == null) {
                    return null;
                  } else {
                    return item.priceProperty(type);
                  }
                }
              });

              // Make column editable:
              col.setEditable(true);
              col.setCellFactory(TextFieldTableCell.forTableColumn(new NumberStringConverter()));

              priceCol.getColumns().add(col);
            }
            table.getItems().setAll(dao.getItemsByCategory(newValue));
          }
        });

    BorderPane root = new BorderPane();
    root.setTop(choiceBox);
    root.setCenter(table);

    Scene scene = new Scene(root, 600, 600);
    primaryStage.setScene(scene);
    primaryStage.show();
  }

  public static void main(String[] args) {
    launch(args);
  }
}

Edited by: James_D January 22, 2013 07:22

Tags: Java

Similar Questions

  • How to create a dynamic RTF report that creates dynamic columns based on the selection of dynamic columns in a table?

    Hi all

    Suppose I have table, whose structure changes frequently on a daily basis.

    For example. / / desc my_table gives you after the name of the column the day 1

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone


    Day 2, two other columns are added, viz, address and salary.

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone

    Address

    Salary


    Now, I want to create a Dynnamic RTF report which made extracting data from all columns from my_table daily. For this, I have defined a simultaneous program with XML output type and include in annex a data/definition of data model that takes XML as input and gives the final result of the conc program in EXCEL layout. I am able to do that for a constant number of columns, but don't know how to do it when the number of columns to display dynamically changes.

    For 1 day my XML file should be like this.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 1, EXCEL output RTF model should be like this.
    Name age phone

    Swapnill 23 12345

    For 2 days my XML file should be like this. With 2 new columns selected in the SELECT clause.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    ,Address
    ,Salary
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
      <element name="Address" value="Address" />
      <element name="Salary" value="Salary" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 2, exit EXCEL model RTF should be like this.
    Name address telephone pay

    23 12345 Madrid 100000 Swapnill

    Now, I don't know below things.

    • Make the dynamic XML as we did in the day 1 there are 3 columns in the SELECT statement and the day 2, 5 columns. I want to create a dynamic XML which must not be changed if the new columns are added into my_table. I don't know how to create this query and also create their corresponding items below.
    • Make the RTF model dyanamic as day 1 there are 3 exit EXCEL columns and the day 2, 5 columns. I want to create a dynamic RTF model that would display all the columns selected in XML dynamic. I don't know how the RTF will create new XML tags and how it will know where to place them in the report. Means, I can create model RTF day 1, by loading the XML data for 3 columns and place 3 tags XML in the model. But how he will create and place the tags for the new columns the day 2?

    Hope so, you got my requirement, it's difficult. Please let me know how I can implement the necessary solution using the RTF dynamically without any manual intervention.

    Kind regards

    Patricia K.

    Post edited by: SwapnilK

    Hi guys,.

    I was able to solve above the requirement.

    I created a procedure that would create & update (attached to the data definition) XML file dynamically for each race. This dynamic XML contains the SQL statement for the data query that is built dynamically. I am updating this XML file using XDOLoader utility to the definition of data. Then run my program customized to generate the excel output.

    Exit excel retrieves correct number of columns dynamically (3 on Day1 and Day2 5), with corresponding data records.

    Kind regards

    Patricia K.

  • How to create a dynamic lov inside the table?

    Hi all

    I use JDeveloper11.1.1.1.4.

    My scenario is that I have page with editable < af:table >. Table contains a < af:inputListOfValues > inside the column. I want to do this < af:inputListOfValues >

    as a dynamic. Because according to users, we have to get the chronogram different objects in different point of view. I tried with below link it works very well for forms.

    But editable tables, I'm not able to create the dynamic lov.

    ADF practice: dynamic linking LOV

    Thank you

    David.

    Hello David

    have you tried ADFbc lov switcher?

    See - Andrejus Baranovskis Blog: Groovy - multiple LOV by attribute in JDeveloper 11 g

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/89-adfbc-lov-switcher-454168.PDF

    Thank you

  • Can I create multiple dynamic entries during execution?

    Can I create multiple dynamic entries during execution?

    Oracle 11g
    Request Express 4.0.2.00.06

    Here's my problem:
    We have a table that contains metadata about the files (paper or electronic).
    We hope that we can need more columns in the table at some point and do not want to change the table or the application.

    So to do this I would like to create:

    A table called TBL_FILE with columns:
    NUMBER of TBL_FILE_ID (this will be the primary key)
    TBL_FILE_NAME VARCHAR2 (1000) (this will be the name of the file)

    A second table will be called TBL_FILE_META with columns:
    NUMBER of TBL_META_ID (this will be the primary key)
    NUMBER of TBL_FILE_ID (this will be the key to forign to the files table)
    TBL_META_COLUMN VARCHAR2 (30) (this is what would be the name of the column if it existed in TBL_FILE)
    TBL_META_VALUE VARCHAR2 (1000) (this is the value of this record and the column "would be")

    If a person can have as many meta data in the file to add columns to the table.
    The problem is how can I allow users to add as much data as they wish with them having to re develop page.

    Other things to note is that we would like this be on one page.
    I know how to add we can create inserts several rows using a SQL (editable report).
    However the TBL_META_VALUE in the TBL_FILE_META column will sometimes be a selection list and other times one text box or a numeric field.
    So I don't see now a SQL (editable report) would work for this and I can't create a table of elements on the page running I can?

    No idea how I might accomplish this? Is there a better way to do this?

    It is a term or a name for what I'm doing by creating these "virtual" columns in another table?
    I found this method looking at the workflow tables Oracles.

    Welcome to the Oracle Forums!
    >
    Can I create multiple dynamic entries during execution?

    Oracle 11g
    Request Express 4.0.2.00.06

    Here's my problem:
    We have a table that contains metadata about the files (paper or electronic).
    We hope that we can need more columns in the table at some point and do not want to change the table or the application.

    So to do this I would like to create:

    A table called TBL_FILE with columns:
    NUMBER of TBL_FILE_ID (this will be the primary key)
    TBL_FILE_NAME VARCHAR2 (1000) (this will be the name of the file)

    A second table will be called TBL_FILE_META with columns:
    NUMBER of TBL_META_ID (this will be the primary key)
    NUMBER of TBL_FILE_ID (this will be the key to forign to the files table)
    TBL_META_COLUMN VARCHAR2 (30) (this is what would be the name of the column if it existed in TBL_FILE)
    TBL_META_VALUE VARCHAR2 (1000) (this is the value of this record and the column "would be")

    If a person can have as many meta data in the file to add columns to the table.
    The problem is how can I allow users to add as much data as they wish with them having to re develop page.
    >
    Creation of dynamic Page elements is not available. You must create surplus items and hide/show, etc. But you cannot change the element Type. Overall, too many restrictions in this approach.
    >
    Other things to note is that we would like this be on one page.
    >
    The limit of 100 points will hit you if you go with extra page element. With the form of tables that should not be a limitation, unless you're exceeding the limit of 50 APEX_APPLICATION point. G_Fnn points and limitation of the 60 column of the region report with "(analyze the query executing only) use generic name column" in the dynamic region.
    >
    I know how to add we can create inserts several rows using a SQL (editable report).
    However the TBL_META_VALUE in the TBL_FILE_META column will sometimes be a selection list and other times one text box or a numeric field.
    >
    If the type if the item is variable, that doesn't mean that you have to type a way to store the item. Metadata of meta data.
    >
    So I don't see now a SQL (editable report) would work for this and I can't create a table of elements on the page running I can?
    >
    Yes, you can do it. Update report / query in a table can be built from the metadata using the SQL query that returns the PL/SQL function . It will be a bit of coding in PL/SQL where you use metadata and metadata of Meta data to restore your SELECTION with the right APEX_ITEMs. He might have a decrease in performance associated with it, but it will not be a serious degradation.
    >
    No idea how I might accomplish this? Is there a better way to do this?

    It is a term or a name for what I'm doing by creating these "virtual" columns in another table?
    I found this method looking at the workflow tables Oracles.
    >
    I guess it's just a good TNF. This is the master model / retail Design, sounding more modern? ;)

    Kind regards

  • dynamic columns

    I use

    DB 10g Release 10.2.0.1.0

    Oracle 6i 6.0.8.8.3 reports

    in the table below.

    How can I have the dynamic columns 'fault' in reports in the order of its highest value of occur_times.

    and a view that gives me no reports (formats below).

    CREATE TABLE dem

    (trid NUMBER (9.0),)

    tr_date DATE,

    point VARCHAR2 (10),

    failure VARCHAR2 (5).

    occur_times NUMBER (9.0))

    /

    INSERT INTO dem

    VALUES

    (1, 26 - JAN 2016', 'MC', 'AB', 3)

    /

    INSERT INTO dem

    VALUES

    (2, 26-JAN 2016', 'MC', 'FM', 2)

    /

    INSERT INTO dem

    VALUES

    (3, 26 - JAN 2016', 'MC', 'SO', 5)

    /

    INSERT INTO dem

    VALUES

    (4, 27 - JAN 2016', 'MC', 'AB', 8)

    /

    INSERT INTO dem

    VALUES

    (5, 27-JAN 2016', 'MC', 'FM', 2)

    /

    INSERT INTO dem

    VALUES

    (6, 27-JAN 2016', 'MC', 'SO ', 1).

    /

    Commit

    /

    example1

    "Report of input parameter: count 26 January 2016 ' to 26 January 2016"

    Output format of report

    point defects Total SW AB FM

    -------   ----------------   ----    -----  -----

    MC                10       5      3      2

    e.g.2

    "Report of input parameter: count 26 January 2016 ' January 27, 2016"

    Output format of report

    point defects Total FM SW AB

    -------   ----------------   ---------  -----

    21 11 6 4 MC

    in example1 in date range, the flaws in the order of its value max occur_times is FM SW, AB,

    but in e.g.2. in view of the date range default by order of its value max occur_times is AB, SW, FM

    THE FAULT of MAX VALUE should take precedence i.e. dynamically in the reports.

    concerning

    teefu

    Lahore, pakistan.

    You must create the parameter in the oracle reports. When the report of the form calling create the parameter list and then pass the required parameter.

    SELECT the item,

    fault,

    Sum (occur_times) tot_times,

    ROW_NUMBER() over (ORDER BY SUM (occur_times) DESC) rn

    DEM

    WHERE the fault ("AB", "FM", "SW")

    AND tr_date BETWEEN TO_DATE(:p_dt1,'dd-Mon-yyyy') AND TO_DATE(:p_dt2,'dd-Mon-yyyy')

    GROUP BY item, fault

    ;

  • OBIEE dynamic column headings based repository Variables

    Hello

    How can we provide variable name of the repository (from RPD) as column headings in reports (presentation Services).

    Can you please suggest me how to do it?

    Thanks in advance...

    RAM

    Hello

    You can use the following link.

    Oracle Business Intelligence 11g: OBIEE 11 g dynamic column headings

    I used the variable presentation here, you can substitute the variable repository. The difference is that you don't need to create variable presentation, instead you use repository variable there.

    If you are not clear with this, pleas come back. I'll write a new message on your problem.

  • What tool is used to create pdf dynamically?

    I want to dynamically create PDFS that are editable Textbox, Combobox with validation, calculation of several Textbox, add line dynamically while click on the button in c#. ?

    How is this Possible?

    What a me reference Acobat SDK or Adobe Reader DC?

    Please provide a link where all Sample Code is available?


    The respect of

    Anil


    Hi Anil,

    DC Adobe Acrobat Reader is a pdf reader, you will not be able to create PDF files using it.

    You will need Acrobat DC (Adobe Acrobat free trial downloadversion |) Acrobat Pro DC) to create forms PDF as you stated above.

    Help links: -.

    Kind regards

    Nicos

  • OBIEE 11 g dynamic column headings

    I doubt I should do some dynamic column headings in OBIEE 11 g

    I have guest months (1,2,3...)

    but in the report I want column header to be something as if showing 1 do Jan...

    How to achieve this and is for the column headers!

    Thank you

    NK

    I fixed that with a dummy work around

    created a new prompt and pass values of the previous message and put this quick as a filter on the dashboard (dashboard properties).

    and used this new prompt variable as a header for the report

    He worked

    Thank you

    NK

  • creating a dynamic list of values

    Hello

    While I am trying to create a dynamic list of values on a table (table1) with h_id columns, the head_foot and the header. I gave the query to create the dynamic values as list

    Select d, r header header
    of g.fw_header_footer
    order by 1

    where d is the display value and r is the return value to get the error message

    "1 error has occurred."

    LOV query is not valid, a display and a return value is needed, the column names must be different. If your query contains a query online, the first CLAUSE in the SQL statement must not belong to the query online. »


    Can someone please suggest me if am wrong.


    Thanks in advance

    Hello

    I suggest that you check the permissions of your application of the analysis of schema has on your g.fw_header_footer table.

    It is a mistake to mislead, but I've just reproduced the same problem trying to select from a table that I didn't have SELECT permission.

    Scott

  • Dynamic columns in dashboard prompt

    Hi all
    I have to 'TOP' dispay & dynamic value 'BOTTOM' in the drop-down list of the dashboard invites the creation of a dynamic column value in the drop-down list prompt dashboard? I'm trying to create in writing view sql result but not getting does not correctly according to the selection of HIGH and low, I must make a report changes
    SELECT CASE WHEN 1=0 THEN ExistedPresentationColumn ELSE 'TOP' END FROM SubjectArea
    
    UNION ALL
    
    SELECT CASE WHEN 1=0 THEN ExistedPresentationColumn ELSE 'BOTTOM' END FROM SubjectArea
    
  • Problem of filling and creating a dynamic DataGrid control

    Hello

    I have a scenario eventually, and I'm desperate that anyone who reads this message might help me. I have a table in what follows I would use its individual child element as the data in each column.

    I wonder if someone can provide some guidance on how I can do this, because I can't fill in the data, and so he keeps throwing the error unable to create a new column to me.

    Can someone help me please?

    Thanks in advance.

    The code is attached.

    Alice

    "alice_data" wrote in message
    News:gn5fli$20D$1@forums. Macromedia.com...
    > Hi, Amy:
    >
    > I want to say is that I intend to create a DataGrid that contains all the
    > I've specified in dg.columns = ['region_name', 'population',
    [> 'market'];

    The DataGrid columns table must contain column objects, not strings.

    > However, since all values are generated dynamically, I could
    > probably
    > only to add a column to the times, but I want to add all columns to
    > a
    > dataGrid unique instead of create a DataGrid for each of the columns.
    > With my
    > structure current codes, I think that I create something with the individual
    > columns
    > on each of the new dataGrids.

    Each object on the display list can have only one parent. As the saying
    go, you cannot have your cake and eat it, too. Or put in a more
    metaphor of everyday, if you paid your red shoes to Martha, you cannot also
    Wear them. So IFI am you understand, you want to create a
    DataGrid with multiple columns, and then use these columns in several
    DataGrids? It is not possible.

    > Did I do something wrong to try to reach what I wanted to do? With
    > a
    > DataGrid with multiple columns?

    It is quite possible to have several columns in a DataGrid control. It's
    What to do in datagrids. And of course if your code does not achieve what you set
    to do this, it is a problem. It's just very difficult to determine exactly
    where your problem lies.

    You can find this useful example
    http://blog.flexexamples.com/2008/03/04/dynamically-adding-new-columns-to-a-DataGrid-contr ol in flex.

  • Missing cells in the table of dynamic columns

    Hello

    I am creating a table using dynamic columns. Here's an example simplified data that I use:

    < sales >
    ... < drive >
    ... Honda < brand > < / brand >
    ... < color > green < / color >
    ... < / car >
    ... < drive >
    ... Nissan < brand > < / brand >
    ... < color > blue < / color >
    ... < / car >
    ... < drive >
    ... Honda < brand > < / brand >
    ... < color > blue < / color >
    ... < / car >
    < sales >

    I am grouping the brands for the lines, and I want a number of colors as my dynamic column. I find myself with a table that looks like this:

    ----------------------------------------------------------------------------------
    Brand | Blue | Green |
    ----------------------------------------------------------------------------------
    Honda | 1. 1.
    ----------------------------------------------------------------------------------
    Nissan | 1
    --------------------------------------------------------

    Since there is no green Nissan, a cell not created so I find myself with a hole in my table. Ideally, I would want a cell containing 0 to be in this space.
    Is it possible, or to all the least have a cell in this space, so I did not have a table with gaps?

    Thank you!

    Hi cc22

    If you have a look at these. http://winrichman.blogspot.com/search/label/cross%20tab
    you will identify yourself,

    its simple... If this is not the case, let me know.

  • How to create a dynamic form with bind variable: figure &amp;: table_name

    My application has two LOV, one to select a schema and the other to select a table in this schema. Then I have a button that goes to a report that displays data in this table.schema.

    Now, I want to create a link to a form where I can edit the record based on the identifier of this table.schema, but it does not appear that I can create a dynamic form where I pass the schema.table_name and the rowid. Is this possible? Can someone tell how can I do this? The form builder only wants a fixed schema/table name.

    Thanks in advance.

    Stuart.

    Hi Stuart,

    If you create your section in the section #BOXBODY # it will already have to be encapsulated in a form.

    He will submit to the correct location.

    If you call your field of multi line field names, they will be stored in them.

    form field f01 is mapped to wwv_flow.g_f01

    Concerning

    Michael

  • I have a column with two values, separated by a space, in each line. How to create 2 new columns with the first value in a column, and the second value in another column?

    I have a column with two values, separated by a space, in each line. How do I create 2 new columns with the first value in one column and the second value in another column?

    Add two new columns after than the original with space separated values column.

    Select cell B1 and type (or copy and paste it here) the formula:

    = IF (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    shortcut for this is:

    B1 = if (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    C1 = if (Len (a1) > 0, Member SUBSTITUTE (A1, B1 & "", ""), "")

    or

    the formula of the C1 could also be:

    = IF (Len (a1) > 0, RIGHT (A1, LEN (A1) −FIND ("", A1)), "")

    Select cells B1 and C1, copy

    Select cells B1 at the end of the C column, paste

  • Dynamic columns based on the user login

    Dear Experts,

    Is it possible to display the columns dynamically according to the connection of the BI Publisher user?

    For example, if the report of RTF model has 10 columns in total and if I connect with a user named "abc", I should be able to see, say 6 columns containing information about the user "abc".

    And if I have connection with "xyz", I should be able to see, say 7 columns containing information about the user "xyz".

    I will be able to assign to which column should be displayed to the user who?

    If there is a way to achieve this scenario, please let me know as soon as possible, since there is an urgent need.

    Your help will be very appreciated.

    Thanks in advance!

    Yes, using: xdo_user_name in the SQL data model, you can get the details for user identification.

    Then use this model column RTF for display of the dynamic columns.

    Example:

    Select: xdo_user_name as USER_ID of the double

    In RTF

    Column header

    Column data

Maybe you are looking for