create a materialized with sizes of specific columns view

Hi all

I am creating a materialized with a specific column size view. Something like
create materialized view test_mv
refresh force on demand
as
select id, 
       cast(my_compound_field as nvarchar2(50))
from ( select id, 
              field1 || field2 my_compound_field
       from   my_table);
But Oracle seems to ignore the cast and takes the maximum size it finds for field1 | Field2 in the select query. The resulting table has a nvarchar2 (44) instead of nvarchar2 column (50).

Which can be a problem when the display is updated... There could be new data that exceeds the current size, which is where length(field1 || field2) > 44.

How can I change the size of the column to a field in a materialized view?

Edit: Some extra info to clarify my case:
Field1 and Field2 are defined as nvarchar2 (25). Field1 | Field2 can theoretically have a length of 50, but currently there is no data in my table that results from this length, the max is 44. I fear that in the future there is data that is greater than 44, which results in an error when the MV is refreshed!

Published by: Pleiadian on January 25, 2011 14:06

Try the substr function.

http://download.Oracle.com/docs/CD/E11882_01/server.112/e17118/functions181.htm#i87066

Tags: Database

Similar Questions

  • How to create the table with the rows and columns using the layout?

    One of my friends advised me to put my site on the mode of provision as it is better than the standard as he said
    but I couldnot make an ordinary table with the rows and columns in mode available th
    y at - there someone who can tell me how to?
    Thank you very much

    Wednesday, April 18, 2007 21:01:38 + 0000 (UTC), "Mr.Ghost".
    wrote:

    > A friend of mine advised me to put my whole site on the mode of disposal as its
    > better than standard, as he says

    Your friend won't. Don't listen to him any more. Mode of disposal creates
    very fragile and rigid code pauses at the first opportunity.

    Gary

  • Create a table with auto increase of columns

    I remember there is a single line of SQL to create a column that can auto increase. -Does anyone know it? something like below:

    CREATE TABLE HAS
    (
    ID INTEGER AUTOINCREMENT
    )

    Thanks a lot for your help!

    Not in Oracle, no.

    You can simulate the SQL Server AUTOINCREMENT feature by

    -Creating a table
    -Creating a sequence
    -Creating a level trigger line BEFORE INSERT on the table that populates the column, i.e.

    CREATE TABLE a (
      a_id integer primary key
    );
    
    CREATE SEQUENCE a_id_seq;
    
    CREATE TRIGGER trg_a
      BEFORE INSERT ON a
      FOR EACH ROW
    BEGIN
      SELECT a_id_seq.nextval
        INTO :new.a_id
        FROM dual;
    END;
    

    Justin

  • Create a folder with subfolders named structure

    I have a script that creates a project with a series of subfolders folder:

    The first step is to

    Tell application "Finder".

    text returned jobFolder value (display dialog "enter a working folder name:" default of answer "XYZ123 Customer_Project")

    This opens a dialog box where I enter the name of the project and client etc. This creates a folder with the same specific name.

    It then creates a folder in the call of the output files

    make new folder to the newfo to the properties {name: "output files}

    In the output files folder it then creates a folder with the same name as the name of the original folder "XYZ123 customer Name_Project" (or whatever it is I named it at the initial stage.)

    make new folder at the exit with properties {name: jobFolder}

    I'd like to create this folder with {name: jobFolder} + name of the printer

    for example;

    XYZ123 client Name_Project PRINTER_A

    XYZ123 client Name_Project PRINTER_ B

    XYZ123 client Name_Project PRINTER_ C

    Is this possible? Tips appreciated.

    Use the following code:

    make new folder at the exit with properties {name: jobFolder & 'PRINTER_A'}

    (138871)

  • create a table with 2000 records

    Hello

    can someone guide me to create a table with 2000 records
    the columns and data types are as follows
    number of inventory_item_id
    number of organization_id
    number of process_flag
    transaction_type varchar
    number of set_process_id
    number of min_minmax_quantity
    number of max_minmax_quantity


    process_flag is always have a value of 1, set_process_id always has the value 3 and transaction_type should be done with the update and the remaining columns will have different values

    kindly guide me

    thanking in advance

    It doesn't really matter what you... just trying to generate the insert statement in excel first on each row and then cut and paste... and make sure that they are syntactically correct before running each other and engage

  • Create MVIEW fails with ORA-30036

    Hello

    I get the error ORA-30036 when you try to create a MVIEW:

    ORA-30036: unable to extend segment by 4 in undo tablespace "UNDOTBS1.

    I would like to understand why I get this error? is the creation of MVIEW uses the undo tablespace? What other info I can give you if it helps?
    CREATE MATERIALIZED VIEW MY_MVIEW
    AS
    SELECT col1,col2,col3,col4,col5,col6,col7
      FROM Table
     WHERE col1 = 'A'
    Thank you.

    Yes, creating a view Matt will use cancellation space. A materialized view actually creates a table with the results of the view, so he uses undo to save inserting rows, and to tracj, updates the allocation data dictionary and the space.

    John

  • Create a form of Apex based on database views

    How can I create a vision-based Apex form? The list of values do not include the name of the view, it lists only the tables. When I add the name of the view in the name of the Table I get the message "source tables forms and forms in form of table should have a primary key"

    Hello

    You can make a hint:
    (1) rename your view.
    (2) create an array with the name of the view, primary key, and the same columns as in the notice.
    (3) create a shape of APEX
    (4) remove the table
    (5) to rename original name display

    Best regards, Kostya Proskudin

  • When we try to create a shape with a predefined size above 10 x 10 inches of ps cs6, we get the next value in A message between 0.00 10.00 inches and thumb is necessary.  Close value inserted.

    When we try to create a shape with a predefined size above 10 x 10 inches of ps cs6, we get the next value in A message between 0.00 10.00 inches and thumb is necessary.  Close value inserted.

    You could put in your dimensions in the boxes of fixed size .

    Then just click on you document and move the object slightly before releasing the mouse if you don't get this pop up dialog box to create a Rectangle rounded.

  • Can FrameMaker to create several Master Pages with sizes different pages in a single file of FM?

    Can FrameMaker to create several Master Pages with sizes different pages in a single file of FM?

    N °

    You must break your content between files and use the book feature to apply numbering to make look it seamless. Sometimes, if you can, re - organize the content so that all oversize pages come at the end of a chapter/file makes it easier to manage a such split files in the book.

  • How to create a table with editable column values.

    Hello world
    I think it's very simple, but I am unable to find how to do this. This is my requirement. I need to create a table with n columns and 1 line initially. the user must be able to enter data into this table and click of a button must insert the data into the database table. Also, there should be a button at the bottom of the table to add 1 line to the table.

    I know how to do the insertion of data, but can someone please let me know how to create a table which allows the user to enter data and how to create a line button Add 1?


    Thanks in advance!

    Raghu,

    Go through the tutorial of Toolbox Page & Advanced section of the Guide of the OFA table.

    Step 1 - you need to create EO & VO from this EO. This EO will be table of database where you want to insert the data.

    Step 2 - create an advanced table region. (See this section in table advanced for more details)

    Step 3 - attach this VO in the BC4J region advanced Table component.

    Kind regards
    GYAN

  • Create a document with columns and the effects of impression

    If you create a new document and set the columns in the new menu document inside, and then subsequently create images, tables, text etc. in the document that are larger that a single column (which for example spans the whole page), will be the part of the image that is in the gutter print or see if it is saved in PDF format?

    Help!

    Thank you!

    Guides are there as a reference for you help in alignment. They restrict what or where objects can be placed or affect their visibility or printability.

    To see what your printed page, switch to Preview Mode (quick is to press W with nothing selected).

  • How to create a table with two unique columns

    How to create a table with two unique columns. I use the following syntax below and I get the error message such unique or primary key already exists.

    create the table COPQ_WORKCELL_GOAL
    (
    Type_id varchar2 (4) NOT NULL UNIQUE,
    Tyle_Location varchar2 (30) NOT NULL UNIQUE,
    Type_Description varchar2 (20).
    KEY elementary SCHOOL (Type_id)
    );

    Use 1 or the other column type_id;

    create table COPQ_WORKCELL_GOAL
    (
      Type_id varchar2(4),
      Tyle_Location varchar2(30) NOT NULL UNIQUE,
      Type_Description varchar2(20),
      PRIMARY KEY (Type_id)
    );
    
    Table created
    drop table COPQ_WORKCELL_GOAL;
    
    Table dropped
    create table COPQ_WORKCELL_GOAL
    (
      Type_id varchar2(4) primary key,
      Tyle_Location varchar2(30) NOT NULL UNIQUE,
      Type_Description varchar2(20)
    );
    
    Table created
    
  • Error ORA-01115 creating the materialized view

    Hi friends,

    When I create a materialized view it by throwing some error

    CREATE THE PNR_RES_MV MATERIALIZED VIEW
    TABLESPACE FAS
    NOCACHE
    LOGGING
    NOCOMPRESS
    NOPARALLEL
    IMMEDIATE CONSTRUCTION
    REFRESH THE STRENGTH TO DEMAND
    WITH THE PRIMARY KEY
    AS
    SELECT C_CREATION_DATE, C_PNR, B.CARRIER_CD1, B.CARRIER_CD2, B.CURRENT_STATUS_CD, A.CANCELLED_IND, A.BOOKING_OFFC_NMBR,-, B.LEG_NMBR, C_PAX_NMBR
    COUNT (CASE WHEN TRIM (B.CURRENT_STATUS_CD) = "HK" AND (TRIM (C_CHANGE_OR_CANCELL_IND) = "OR C_CHANGE_OR_CANCELL_IND IS NULL) THEN 1 OTHER TRAILING NULL) CONFIRMED_COUNT,.
    COUNT (CASE WHEN (B.CURRENT_STATUS_CD) TRIM = "HK" AND (TRIM (C_CHANGE_OR_CANCELL_IND) = "or C_CHANGE_OR_CANCELL_IND IS NULL) null THEN 1 OTHER END) cancELLED_COUNT
    OF PNR_RES_LEG_PAX_MV B, PNR_RES HAS
    WHERE A.PNR = B.PNR
    AND a.CREATION_DATE = b.CREATION_DATE
    - and A.BOOKING_OFFC_NMBR = '1F'
    - AND C_PNR = 'XE76V. '
    AND A.FILE_UPDATE_DATE. A.UPDATE_DATE IN (SELECT MAX (D.FILE_UPDATE_DATE |)) (UPDATE_DATE) OF PNR_RES D WHERE D.PNR = B.PNR AND D.CREATION_DATE = B.CREATION_DATE)
    GROUP OF C_CREATION_DATE, C_PNR, B.CARRIER_CD1, B.CARRIER_CD2, B.CURRENT_STATUS_CD, A.CANCELLED_IND, A.BOOKING_OFFC_NMBR;



    When executing it it gives this error


    ORA-01115: reading block IO file error 4 (block # 63757)
    ORA-01110: data file 4: ' D:\APP\IGT\ORADATA\ORCL\USERS01. DBF'
    ORA-27070: async read/write failed
    OSD-04006: ReadFile() failure, unable to read the file
    S/O-error: (27 OS) the drive cannot find the sector requested.



    And I checked through RMAN

    RMAN > validate the audit logic datafile 4;

    From post 11 March 14
    using the control file of the target instead of recovery catalog database
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID = 127 type device = DISK
    channel ORA_DISK_1: starting from the data file validation
    channel ORA_DISK_1: datafile (s) for specification validation
    Enter a number of file datafile = 00004 name = D:\APP\IGT\ORADATA\ORCL\USERS01. DBF
    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-03009: failure to validate the command channel ORA_DISK_1 11/03/2014 13:0
    04:12
    ORA-19501: read error on the file 'D:\APP\IGT\ORADATA\ORCL\USERS01. DBF', block numbe
    r 63745 (block size = 8192)
    ORA-27070: async read/write failed
    OSD-04016: error queuing an asynchronous i/o request.
    S/O-error: (27 OS) the drive cannot find the sector requested.



    Please suggest me what to do it is a mistake to associate related database or OS. DB version is - 11 GR 2


    Kind regards


    Arya


    This is the error message that you should focus:

    > O/S-error: (27 OS) the drive cannot find the sector requested.

    Run disk checker utilities, eventually the file system is damaged.

    Hemant K Collette

  • Creating a TableView with a component, problem with my lines.

    I am trying to create a table in a pane. Each row in the table will have three columns. I found an example of code to create the table, but I'm getting additional lines that I don't want.

    I want only lines with 3 columns but I have extra lines, including the content of the last column see image.

    Is someone can you please tell me what is wrong with my code?

        private Pane createPane(String category) {
    
            VerticalFieldManager vfm = new VerticalFieldManager();
    
            vfm.add(new LabelField("Add Task:", Field.FOCUSABLE | LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH));
    
            // Initialize the model if it has not yet been loaded
            _tableModel = new SortedTableModel(StringComparator.getInstance(true), 2);
    
            // Populate the list
            for (int i = 0; i < 3; i++) {
    
                String col1 = i + " 1";
                String col2 = i + " 5";
                String col3 = i + " 3";
    
                _tableModel.addRow(new Object[]  {col1, col2, col3});
            }
    
            // Create and apply style
            RegionStyles style = new RegionStyles(BorderFactory.createSimpleBorder(new XYEdges(1, 1, 1, 1), Border.STYLE_SOLID), null, null,
                null, RegionStyles.ALIGN_LEFT, RegionStyles.ALIGN_TOP);
    
            // Create the view and controller
            TableView tableView = new TableView(_tableModel);
            TableController tableController = new TableController(_tableModel, tableView);
    
            // Set the controller focus policy to highlight rows
            tableController.setFocusPolicy(TableController.ROW_FOCUS);
    
            // Set the behaviour of the controller when a table item is clicked
            tableController.setCommand(new CommandHandler()
            {
                /**
                 * @see CommandHandler#execute(ReadOnlyCommandMetadata, Object)
                 */
                public void execute(ReadOnlyCommandMetadata metadata, Object context)
                {
                    Dialog.alert("Command Executed");
                }
    
            }, null, null);
    
            tableView.setController(tableController);
    
            // Create a DataTemplate that suppresses the third column
            DataTemplate dataTemplate = new DataTemplate(tableView, 1, 3)
            {
                /**
                 * @see DataTemplate#getDataFields(int)
                 */
                public Field[] getDataFields(int modelRowIndex)
                {
                    Object[] data = (Object[]) ((TableModel) getView().getModel()).getRow(modelRowIndex);
    
                    Field[] fields = new Field[3];
                    fields[0] = new LabelField(data[0], Field.FOCUSABLE);
                    fields[1] = new LabelField(data[1], Field.FOCUSABLE | DrawStyle.HCENTER);
                    fields[2] = new LabelField(data[2], Field.FOCUSABLE);
    
                    return fields;
                }
            };
    
            // Set up regions
            dataTemplate.createRegion(new XYRect(0, 0, 1, 1), style);
            dataTemplate.createRegion(new XYRect(1, 0, 1, 1), style);
            dataTemplate.createRegion(new XYRect(2, 0, 1, 1), style);
    
            // Specify the size of each column by percentage, and the height of a row
            dataTemplate.setColumnProperties(0, new TemplateColumnProperties(15, TemplateColumnProperties.PERCENTAGE_WIDTH));
            dataTemplate.setColumnProperties(1, new TemplateColumnProperties(15, TemplateColumnProperties.PERCENTAGE_WIDTH));
            dataTemplate.setColumnProperties(2, new TemplateColumnProperties(70, TemplateColumnProperties.PERCENTAGE_WIDTH));
            dataTemplate.setRowProperties(0, new TemplateRowProperties(ROW_HEIGHT));
    
            // Apply the template to the view
            tableView.setDataTemplate(dataTemplate);
            dataTemplate.useFixedHeight(true);
    
            vfm.add(tableView);
    
            // Pane's title
            LabelField iconTextLabelField = new LabelField(category, Field.FOCUSABLE | Field.FIELD_HCENTER);
            return (new Pane(iconTextLabelField, vfm));
        }
    

    Thanks in advance.

     _tableModel = new SortedTableModel(StringComparator.getInstance(true), 2); <-- "2" sorts it by the object at index 2, which is your "col3". The extra rows you see are like headers for the sorting. I think you should use a different Table Model.
    
            // Populate the list
            for (int i = 0; i < 3; i++) {
    
                String col1 = i + " 1";
                String col2 = i + " 5";
                String col3 = i + " 3";
    
                _tableModel.addRow(new Object[]  {col1, col2, col3});
            }
    
  • What script to create a model with a user interface panel

    Hello guys,.

    So I am new to scripting and javascript and I'm trying to keep it simple. I'm a VJ and want to create a script where I get a 'BPM' and a 'beat' lengh and it generate me a comp with the right length and * a layer with a marker ofr each beat.

    I was able to create this script, but I try to make it look a little better with integration of the user interface for AE I wasn't able to make it work right. If anyone can help me or give me some advice. I think that I'm not good with the expression "addComp" in the buildUI function.

    I copy everythin because it is long but you'll be understaind the main idea. My question is how to that the entry in my Advanced UI instead of "the guest".

    Here is my first code that does the job:

    Elements Var Set

    var name = prompt ("membership name");

    var BPM = prompt ("your BPM");

    If (isNaN (BPM)) {}

    Alert ("you must give the model a value");

    }

    Var prompt = beats ("how many times");

    If (isNaN (Beats)) {}

    Alert ("you must give the model a value");

    }

    frameRate var = prompt ("your fps");

    If (isNaN (frameRate)) {}

    Alert ("you must give the model a value");

    }

    term var = (60 / BPM * bat); Automatically generated

    var beat = (60 / BPM);

    Part of creation

    app.project.items.addComp (name, 1920, 1080, 1, duration, frameRate); Create the model with custom Lengh

    App.Project.Item (01).layers.addSolid ([0,0,0], "BG", 1920, 1080, 1, length); Create solid BG

    var firstLayer = app.project.item (1) .layer (1);

    firstLayer.label = 16;

    App.Project.Item (01).layers.addSolid ([0,0,0], "FX", 1920, 1080, 1, length); Create sound FX

    App.Project.Item (01).layers.addNull (Duration); Create the Null object

    var firstLayer = app.project.item (1) .layer (1); Rename the Null object

    firstLayer.enabled = false;

    firstLayer.name = "Beats";

    firstLayer.label = 0;

    Place a marker on the 64 first beat

    var myMarker = new MarkerValue("0");

    firstLayer.property("Marker").setValueAtTime (beat * 0, myMarker);

    Every beat on opacity-keys

    myProperty = firstLayer.opacity;

    myProperty.setValueAtTime (beat * 0, 0);


    For reference, I'm going to place code Dan here and use line numbers, as I explained.

    Fig. A

    var name = prompt("Composition name");
    var BPM =prompt("Your BPM");
    if (isNaN(BPM)) {
        alert("You must give the comp a value");
      }
    
    var Beats = prompt("How Many Beat");
    if (isNaN(Beats)) {
        alert("You must give the comp a value");
        }
    
    var frameRate = prompt("Your fps");
    if (isNaN(frameRate)) {
        alert("You must give the comp a value");
        }
    
    var duration = ( 60  / BPM * Beats ); //Auto Generated
    var beat = (60  / BPM);
    //Creation Part
    var myComp = app.project.items.addComp(name, 1920, 1080, 1, duration, frameRate); // Create Comp with Custom Lengh
    var firstLayer = myComp.layers.addSolid([0,0,0], "BG", 1920, 1080, 1, duration); // Create BG Solid
    firstLayer.label = 16;
    myComp.layers.addSolid([0,0,0], "FX", 1920, 1080, 1, duration); // Create FX Solid
    firstLayer = myComp.layers.addNull(duration); // Create Null Object
    firstLayer.enabled = false;
    firstLayer.name = "Beats";
    firstLayer.label = 0;
    // Place a marker on the 64 first beat
    var myMarker = new MarkerValue("0");
    firstLayer.property("Marker").setValueAtTime(beat*0, myMarker);
    // Key every Beat on opacity
    var myProperty = firstLayer.opacity;
    myProperty.setValueAtTime(beat*0, 0);
    

    OK, so for your configuration, looks like you're striking four data sets. You have the model name (fig.) At line 1), BPM (lines 2-5 of Fig. (A), (lines 7-10 of Fig. rhythms (A) and the FPS (lines 12 to 15 of Fig. (A). then it comes to the UI, you can change what I had posted to...

    res = "group{orientation:'column', alignment:['fill', 'fill'], alignChildren:['fill', 'fill'],\
      myCompName: EditText{text:'Enter comp name'},\
      myBPM: EditText{text:'Enter BPM'},\
      myBeats: EditText{text:'Enter beats'},\
      myFPS: DropDownList{properties:{items:['23.976', '24', '29.97', '30', '59.97', '60']}},\
      createComp: Button{text:'Create comp'},\
    }"
    

    This will give you all entries in four data for the user interface. It is preferable to assign each control to a new variable for use in your script.

    // Control Variables
      var compName = myPanel.grp.myCompName;
      var myBPM = myPanel.grp.myBPM;
      var myBeats = myPanel.grp.myBeats;
      var fps = myPanel.grp.myFPS;
      var createComp = myPanel.grp.createComp;
    

    Once you have these variables you can then start the default implementation as appropriate. in this case, the drop-down list should be a starting point for it's selection, so that you can say to use the first default entry as follows.

    //Defaults
      fps.selection = 0;
    

    Now, you can configure your onClick for button createComp feature. This will contain to working part of the Dan code that treats everything (lines 17-33 of Fig. (A). I've added a few lines of options above this (lines B Fig. 1-7) in the below code just to match the variable names so you wouldn't need to change the code.

    Fig. B

    //onClick setups
      createComp.onClick = function(){
      //Gather user entered values
      var name = compName.text;
      var BPM = Number(myBPM.text);
      var Beats = Number(myBeats.text);
      var frameRate = fps.selection.text;
    
      var duration = ( 60  / BPM * Beats );
      var beat = (60  / BPM);
      //Creation Part
      var myComp = app.project.items.addComp(name, 1920, 1080, 1, duration, frameRate);
      var firstLayer = myComp.layers.addSolid([0,0,0], "BG", 1920, 1080, 1, duration);
      firstLayer.label = 16;
      myComp.layers.addSolid([0,0,0], "FX", 1920, 1080, 1, duration);
      firstLayer = myComp.layers.addNull(duration);
      firstLayer.enabled = false;
      firstLayer.name = "Beats";
      firstLayer.label = 0;
      // Place a marker on the 64 first beat
      var myMarker = new MarkerValue("0");
      firstLayer.property("Marker").setValueAtTime(beat*0, myMarker);
      // Key every Beat on opacity
      var myProperty = firstLayer.opacity;
      myProperty.setValueAtTime(beat*0, 0);
      }
    

    Then line 2 Fig. b starts the call onClick for button and assigns a function. Within the function, we run the process. Fig. B Line 4 seizes the compName edit text attribute of the text control, using the Number() function convert us this text to a number for use online B Fig. 9 and 10 and B Fig. 5 line gets the text attribute of the text control edit BPM. Goes same for line 6 of the Fig. B and the beats variable. For line B Fig. 7, a drop-down list requires calling his selection of the attribute, then it is text attribute to get the actual string. The drop was more logical for FPS due to the standard rates that exist. This list can be changed of course to your liking. Now, there is no safety net as I like to call for the modification of the text controls to make sure text is not entered when you need a number and vice versa. It would be something of can check after line 7, Fig. B before trying to run the code in process (Fig. B lines 9-25). I hope that it will be easy enough for you to understand.

    If the script is as follows.

    {
    function myScript(thisObj) {
      function myScript_buildUI(thisObj) {
      var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "My Panel Name", [0, 0, 300, 300]);
    
      res="group{orientation:'column', alignment:['fill', 'fill'], alignChildren:['fill', 'fill'],\
      myCompName: EditText{text:'Enter comp name'},\
      myBPM: EditText{text:'Enter BPM'},\
      myBeats: EditText{text:'Enter beats'},\
      myFPS: DropDownList{properties:{items:['23.976', '24', '29.97', '30', '59.97', '60']}},\
      createComp: Button{text:'Create comp'},\
      }"
    
      //Add resource string to panel
      myPanel.grp = myPanel.add(res);
    
      // Control Variables
      var compName = myPanel.grp.myCompName;
      var myBPM = myPanel.grp.myBPM;
      var myBeats = myPanel.grp.myBeats;
      var fps = myPanel.grp.myFPS;
      var createComp = myPanel.grp.createComp;
    
      //Defaults
      fps.selection = 0;
    
      //onClick setups
      createComp.onClick = function(){
      //Gather user entered values
      var name = compName.text;
      var BPM = Number(myBPM.text);
      var Beats = Number(myBeats.text);
      var frameRate = fps.selection.text;
    
      var duration = ( 60  / BPM * Beats );
      var beat = (60  / BPM);
    
      //Creation Part
      var myComp = app.project.items.addComp(name, 1920, 1080, 1, duration, frameRate);
      var firstLayer = myComp.layers.addSolid([0,0,0], "BG", 1920, 1080, 1, duration);
      firstLayer.label = 16;
      myComp.layers.addSolid([0,0,0], "FX", 1920, 1080, 1, duration);
      firstLayer = myComp.layers.addNull(duration);
      firstLayer.enabled = false;
      firstLayer.name = "Beats";
      firstLayer.label = 0;
    
      // Place a marker on the 64 first beat
      var myMarker = new MarkerValue("0");
      firstLayer.property("Marker").setValueAtTime(beat*0, myMarker);
      // Key every Beat on opacity
      var myProperty = firstLayer.opacity;
      myProperty.setValueAtTime(beat*0, 0);
      }
    
      //Setup panel sizing and make panel resizable
      myPanel.layout.layout(true);
      myPanel.grp.minimumSize = myPanel.grp.size;
      myPanel.layout.resize();
      myPanel.onResizing = myPanel.onResize = function () {this.layout.resize();}
    
      return myPanel;
      }
    
      var myScriptPal = myScript_buildUI(thisObj);
    
      if ((myScriptPal != null) && (myScriptPal instanceof Window)) {
      myScriptPal.center();
      myScriptPal.show();
      }
      }
    
      myScript(this);
    }
    

Maybe you are looking for

  • Sat Pro A60 - screen backlight turns off after the connection with the Vodafone 3g data card

    I have a Sam Pro A60 which took a mounted Vodafone 3g data card. It connects OK data card but then the screen becomes 'empty' you can see the icons if you get the light from the window in the right direction, but permanently unusable. A reboot and th

  • SMP - No. Menu or Options

    Help, please! The resolution settings have changed in my Sony Media Player.I can't do anything on my screen. Not even the menu optionsIf I can change it. Everything that appears on the screen is: Video cannot be output from this JackSee/listen using

  • the user will not erase & isn't in Control Panel users

    If I go to C:\Documents and Settings, there is a user that I never had and want to get rid of. But this user has never been and is not present in Control Panel > users. If I try to remove it from C:\Documents and Settings, it starts with a box to con

  • Problems with ports ethernet E4200

    I have problems with my ethernet ports on my router E4200 V1.  I do not get on flow rate of 12 Mbps on a single connected wired computer.  If I replace it with a simple switch 5 port I get 60 Mbit/s using the same cables.  I looked through the creati

  • Folder deleted

    I have a windows 2003 R2 server, I got a "Database" folder and in which many of *.dbf files. All of a sudden the folder & files have one missing. I checked Recycler Bin is not here... I checked with software as Get Data Back, Active Undelete, Recuva,