Extract a part of SelectedItem.data of ComboBox

Hello!

I only use AS2.

A ComboBox is filled with elements all built on the same pattern:

Each element contains:

1 - name of the location (which can contain hyphens, spaces and apostrophes)

2 - details (always indicated in parentheses)

The user selects an item that will be sent to research purposes via PHP to query a MySQL database.

The variable to send should only be the name of the place , because the location of my MySQL Table column contains the names of place without details.

How can I extract only the name of the place?

Thank you very much in advance for your help!

Best regards.

You can use...

dataToSend = String (yourCBName.selectedItem.data) .split ("(") [0]; ")

where 'yourCBName' is replaced by any name you assign to the combobox

This line will split the data line in two parts where begins the parentheses and point to the first part of it.

We know not if you use the appearance selectedItem.label of the combobox, that could help.  What you might consider doing is to have just the data part of the combobox control have the data you want to send, and use of the part of the label to display the entire bit of text you show... or the reverse of the where the label is just the part of name and that is what you send.

Tags: Adobe Animate

Similar Questions

  • Extract parts of value date Selected DateField

    Hi people,

    I would like to extract the part of the year of the value selected from my datefiedl.

    For example, I would get 2010 from: 23/12/2010

    And check if the extracted year is less than the current year.

    How can I do in LiveCycle (JavaScript is better)?

    Thank you

    Yair

    var Input = Num2Date (Date2Num ($.formattedValue, JJ.)) (("" MM. YYYY '), 'YYYY')

    Var Num2Date = (date (), "YYYY")

    If (input only those) then

    xfa.host.messageBox ("bad year")

    endif

    radzmar

    http://thelivecycle.blogspot.com/

  • Can someone tell me how to extract a part of a digital waveform?

    I am trying to extract a part of 2 analog waves (using the http://zone.ni.com/devzone/cda/epd/p/id/4149 for example) analog signals is synchronized with a digital waveform.  I need to extract the same portion of a digital waveform.  Can someone tell me how to add the digital extractor in the example above?

    Hello

    Here's your extractor example slightly modified in order to add the digital data extraction.

    The principle is exactly the same, the tricky part is how to get digital data which is different from analog data.

    You can also add nodes property to identify the value read on the analog graph sliders on the digital chart.

    Kind regards

  • How to recover data from combobox?

    Hey guys!

    I do a purchase order, where the user can enter its coordinates and then choose a product in a menu drop-down.

    So far, I have just given the variable dynamic text fields and used this code:

    on (release) {
         form.loadVariables("order.php", "POST");
    }
    

    But now that I added a ComboBox, there 'variable scope' pitch - how to send the parameter selected in the combobox control to the PHP as well?


    Thank you!!

    your combobox has a selectedItem property, you can use:

    var yourcomboboxselectedItem:String = cb.selectedItem.data;  If you combobx has instance name cb and you want to retrieve the property data

  • Data to ComboBox

    I have a combobox that uses ArrayCollection collection to fill. I can't not get the 'data' property. What Miss me?

    I know the collection ArrayCollection works fine, but when I select the 2 'races', it gets filled by anything.

    Here's my comboBox
    < mx:ComboBox id = "breed1_txt" visible = "false" toolTip = "select the dominant race of the pet" dataProvider = "{breedTypes}" = 'breedName' labelField / >

    Here is my function create when the form is submitted:
    public void addPet(e:Event):void {}
    var petInfo:Object = new Object();
    petInfo.petName = petName_txt.text;
    petInfo.petType = petType_txt.selectedItem.data;
    petInfo.petBreed = breed1_txt.selectedItem.data;
    petInfo.petBreed2 = breed2_txt.selectedItem.data;
    petInfo.petGender = petGender_txt.selectedItem.data;
    petInfo.petAge = petAge_txt.selectedItem.data;
    petInfo.petColors = petColors_txt.text;
    petDAO.create({petData:petInfo});)

    }

    petBreed1 and petBreed2 end up empty. Clues?

    I discovered that when I set the combobox control to an ArrayCollection collection I can pull ALL the data of the original Recordset.

    As far as the ArrayCollection collection includes breedID, breedName and more data. I just changed the function to include breed1.selectedItem.breedID and it worked.

    Thanks for the comments.

  • extract a part of a picture to manipulate

    I tried to extract a part of a picture so that I can work on only a part of it.

    First of all, I import an image and use the tools KING to get the global rectangle.  Then I try to use the global rectangle to extract the part of the image that I want to work on.  That seems to work, except when I move the Courvite back on the original image, the original image "becomes" the extracted image... I tried to copy the original image before working, but the same thing seems to happen... any thoughts.

    This is because you have connected your destination "img" imaq extract.vi to a new imaq create. Create one, give it a different name. It will work.

  • How can I extract a part of a signal inside a loop control and simulation?

    I would like to extract the part of my signal between 0 and 3 seconds. I tried to use the extract of Portion of Signal VI Express, but it does not work. I'm setting the length to the offset 0 and 3 seconds. However, nothing is displayed in the output. I used this before VI successfully, but it wasn't in a loop control and simulation. Is there something special I need to do to make this work properly in this case?

    This forum shows how to measure the time between the Digital pulse http://forums.ni.com/t5/LabVIEW/Measuring-time-between-digital-pulses/td-p/1056881

    In addition, it would be a good link https://decibel.ni.com/content/docs/DOC-12160

  • Event handler on the selectedItem of a ComboBox?

    You can run actionscript as an event handler using the "selectedItem" of a ComboBox?  I prefer to do this by using the XML file, but at this point I'll know any ideas.

    Thank you.

    I am not 100% sure what you mean... but...

    Try this and see your options:

    var x: ComboBox;
    () x.addEventListener

    ^ You can add events to your handle and combobox controls with AS functions... what precisely you trying to do?

    Let me start with this:

    var x: ComboBox;
    x.addEventListener (ListEvent.CHANGE, myListEventChangedFunction, false, 1);

    and according to myListEventChanged, I would like to use the selectedItem object to do your job in there.

  • can I get an exact part of the data in a select statement

    Hi... good afternoon...

    I want to extract the records from a table by the select statement. but I don't want to go as it's the folder. I want to go look for a particular part of the eacg folder in this column.

    for example...

    table_name = tab1
    column_name = col1

    the col1 contains datas as * 'customer research-cs', 'get client-gc', 'customer delete-cd' * etc etc...

    now, while writing the select query, I want to get the descriptive result as get the customer, customer, customer search remove... .that is I don't want the symbols...

    is it possible to achieve this?

    PLSS suggest...

    You mean like these ways to do...

    SQL> ed
    Wrote file afiedt.buf
    
      1* select substr('customer search-cs',1,length('customer search-cs')-3) from dual
    SQL> /
    
    SUBSTR('CUSTOME
    ---------------
    customer search
    
    SQL> ed
    Wrote file afiedt.buf
    
      1* select regexp_substr('customer search-cs','^[^-]*') from dual
    SQL> /
    
    REGEXP_SUBSTR('
    ---------------
    customer search
    
    SQL>
    
  • Recover data to ComboBox

    Hello!

    I have a ComboBox with a dataProvider, which is a collection of ArrayCollection.

    The variable AC, we'll call merge, is like this:

    Merge = newArrayCollection ([{Label: 'One', data: 1, "year": "2009"}, {label: 'Two', data: 2 'year': 10 0 BC'}]);

    For the above example, I need to get all the data from the merged for the selected item.

    To get the label and the data for it, I can use myComboBox.text and myComboBox.value.

    Q: How can I get the value of the year?

    Thank you!

    myComboBox.selectedItem;
    
  • How to extract a part of the image to another image of lager?

    Hello. Please download the images named ' 333 - 1.png "and"333.png"of the spare part. I want to extract the image named "333 - 1.png" of the image named "333.png" automatically. But how can I do? I hope you can help me. Thank you.

    melo_xu

    It will work

  • Not how to show a part of online data in a table in another table with even no column?

    I need to display the data from certain rows in a table in another table with the same numbers of columns and main table must be disabled. Could someone advice how to do this?    Data in the table are from the microprocessor and is intended the user can see and edit only some data.

    If someone can show me some advice, it will be a great help.

    Kind regards

    Annemariehoeven

    Disable a table: SetInputMode (panelHandle, controlID, 0);  ('1' to re - activate).

    Hide a table: SetCtrlAttribute (panelHandle, controlID, ATTR_VISIBLE, 0); ('1' to show it again).

    These commands are valid for each type of control.

    To extract values from the table, you can just use GetTableCellVal or GetTableCellRangeVals: If the range of cells has the same data type, you can use the second command which is faster; If the cells are different (for example digital and channels) you must solve each of them individually. The use of the Clipboard doesn't have this limitation.

  • Extract a part of a large MP4 in a swf

    I would like to create a swf (about 2 minutes) from a file (12 minutes) larger MP4. I can do using other software, such as Roxio Videowave, to extract the desired part and create a new shorter than Flash Pro MP4 can handle. My question is whether it is possible or even practical, to make video extraction using just Flash Pro. It would be desirable to do so because the step of additional software seems to reduce the quality of output.

    use adobe media encoder.

  • Problems while extracting the hours of the Date field

    Hi guys,.

    We hope that you do well.

    I am facing some problems during extraction of the hours of the date field. Here is an example of my orders table:-

    Select * from orders;

    Arrival time of Order_NO product name
    1 computer Office November 20, 10 10:10
    2 November 21, 10 17:26:34 portable
    3 22 January 11 printer 08:10

    Earlier, it is stated that the daily number of orders take place in the roll of the order, I used to write a query

    arrival_time > = trunc ((sysdate-1), 'DD')
    and arrival_time < trunc ((sysdate), 'DD')

    The above query gives me yesterday how many orders have been been held.

    Now I have the new requirement to report on every 4 hours the number of orders will be held. For example if the current time is 08:00 IST then the query must extraction from 04:00 until 08:00 how many orders took place. The report will take place at 12:00 IST which will give me an order took place from 08:00 until 12:00.

    The report will be run every 4 hours per day and generate report of orders taken place for the past 4 hours. I have a programmer who will run this query every hour, but how to understand to get the order at the request of details who arrived for the past 4 hours. I'm not able to do this using trunc.

    Can you please help me how to make this happen. I checked "Extract" also, but I am not convinced.

    Help, please.

    Thanks in advance
    Aalami

    try something like

    with testdata as (
      select sysdate - level/24 t from dual
      connect by level <11
    )
    
    select
      to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS') s
    , to_char(t, 'DD-MM-YYYY HH24:MI:SS') t from testdata
    where
    t >= trunc(sysdate, 'HH') - numtodsinterval(4, 'HOUR')
    
    S     T
    19-06-2012 16:08:21     19-06-2012 15:08:21
    19-06-2012 16:08:21     19-06-2012 14:08:21
    19-06-2012 16:08:21     19-06-2012 13:08:21
    19-06-2012 16:08:21     19-06-2012 12:08:21
    

    trunc (, 'HH') truncates the minutes and the seconds of the date.
    Extract the hour only works on timestamps
    concerning

    Published by: chris227 on 19.06.2012 14:13

  • extract the pdf form xml data

    Hello

    What are the conditions to be able to extract data from a pdf form? I thought, that it is necessary to have the XML schema data connection and that all fields in the form must be bound to this data connection.

    But today I found, that domains can use the right connection 'use name (FieldName)', it's something by default - and that explicit data connection is necessary for this purpose.

    What is the common approach to the design of forms, which must be extracted by LC processFormSubmission?

    Thank you.

    All the data that is retrieved from an XFA form designed will be in xml format. The question then becomes how to control the format of the data that results. By default, the xml structure will follow the hierarchy (it is the Fieldname binding or binding normal use). If you want the data to follow a particular structure (so that you can use it with other systems that have a specific format) so that's when you would use sample XML or a schema in the data connection. Then by nodes of connection in the connection data in the fields, the form knows how to create the desired structure. If the structure is unimportant, then just stick with normal links and that no data connection is necessary.

    Hope that helps

    Paul

Maybe you are looking for