Creating a Dynamic Property LIst

Hi everyone,
How to make a dynamic Property list in lingo
Actually the problem is I am fetching a list of Columns from
the databse which may vary so I want to make a dynamic PropertyList
in which I can Set the property and the values based on the number
of colums in a Database
For Example: In the DB, I have a Table which contains
follwing columns
FName, LName,CompName, Age, Address1, Address2, Email,
website
Now I will select specific colums based on some condition. So
I will be storing the result which would come in a property list.
So this List needs to be Dynamic i.e it should be getting created
based on the colums returned from the query.
Suppose for a specific condition i get Fname, Lname, Email as
a result so my List should look some thing like This
objRecord = objResult.rows[1] --Row Returned from the
Database
listQueryResult = [#FirstName : objRecord[1], #LastName :
objRecord[2], #Email : objRecord[3] ]
The Above List shoud be based on nos of colums returned from
the Query
Is there any way by which i can create such a Dynamic
Property List.
I hope the Question is Clear
Hope to get the answer at the earliest
-Thanks and Regards
-Atul Saxena

You can create a new empty property list like this:
listQueryResult = [:]
To add a property/value pair, you can use:
listQueryResult[
<propertyName>
] =
<value>
or:
listQueryResult.setaProp(
<propertyName>
<value>
The above two commands will add the property if it doesn't
exist, or update a value if the property name is already present in
the list.
You may not be aware that you can use strings as property
names instead of symbols if you like, which you might find easier.
Couple of examples following your example:
listQueryResult = [:]
objRecord = objResult.rows[1] --Row Returned from the
Database
listQueryResult["FName"] = objRecord[1]
listQueryResult["LName"] = objRecord[2]
(etc)
Or, if you also have a list of the fieldnames returned from
the db:
listQueryResult = [:]
fieldNames = objResult.fieldNames --Field names for records
returned from Database
objRecord = objResult.rows[1] --Row Returned from the
Database
repeat with n=1 to fieldNames.count
thisFieldName = fieldNames[n]
thisFieldValue = objRecord[n]
listQueryResult[thisFieldName] = thisFieldValue
end repeat
hope this helps!
- Ben

Similar Messages

  • How to create Exchange dynamic distribution list using multivalue extension custom attribute

    I am trying to create a dynamic distribution list using an ExtensionCustomAttribute.  I am in hybrid mode with Exchange 2013.  The syntax I have is this: 
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {(ExtensionCustomAttribute2 -eq 'NH')} 
    This works correctly on-prem.  But hosted always results in an empty list.  I can see in dirsync the attribute is in the hosted environment, but for whatever reason, the distribution group gets created but always come up null.
    If I create a group looking at the single valued attributes, such as CustomAttribute6 -eq 'Y', it works correctly on-prem and hosted.  
    If anyone has any suggestions I would appreciate it.

    I don't think I provided enough information about the problem.  Let me add some and see if it makes sense.
    I have an Exchange 2013 on-premise configured in hybrid mode with Office365.  For testing purposes, I have 2 users, Joe and Steve, one with the mailbox on-prem, and the other with the mailbox in the cloud.  Each of them has CustomAttribute6 = 'Y'
    and ExtensionCustomAttribute2 = 'NH'. Dirsync shows these users and these attributes are synced between on-prem and cloud.
    Using on-prem Exchange powershell, I run the following command:
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (CustomAttribute6 -eq 'Y')} 
    This correctly finds the 2 users when I query for them as follows:
    $DDG = Get-DynamicDistributionGroup DG_NH
    Get-Recipient -RecipientPreviewFilter $DDG.RecipientFilter | FT alias
    So I then delete this DG, and recreate it this time looking at the multi-value attribute ExtensionCustomAttribute2, as follows:
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (ExtensionCustomAttribute2 -eq 'NH')} 
    Replaying the query above, I can see this also works fine and finds my two users.
    Next I open a new powershell and connect to Office 365 and repeat the process there.
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (CustomAttribute6 -eq 'Y')} 
    This correctly finds the 2 users when I query for them.
    And then delete the group and recreate it using the multi-value attribute:
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (ExtensionCustomAttribute2 -eq 'NH')} 
    When I run the query this time it produces no result.  Every test I try results in an empty group if I am using a multi-valued attribute in the search criteria in the cloud.  If I use single valued attribute, it works fine.
    I really need to be able to get multi-valued DDG's working in the cloud.  If anyone has done this and has any suggestions, I would appreciate seeing what you did.  And if this is the wrong forum to port this, if you can point me to a more suitable
    forum I will report there.
    Thanks,
    Richard

  • How to create a dynamic property in JavaFX

    public class Person() {
    private SimpleStringProperty _Name = new SimpleStringProperty();
    public final String NameGet() {
    return this._Name.getValue();
    public final void NameSet(String Name) {
    this._Name.setValue(ColumnName);
    public StringProperty NameProperty() {
    return this._Name;
    private SimpleStringProperty _SurName = new SimpleStringProperty();
    public final String SurNameGet() {
    return this._SurName.getValue();
    public final void SurNameSet(String SurName) {
    this._Name.setValue(ColumnName);
    public StringProperty SurNameProperty() {
    return this._SurName;
    How to create a dynamic property in JavaFX ?
    ObservableMap, ObservableMapValue, MapPropertyBase, MapProperty
    Which one should I use. Can you give an example?

    I'm not sure what you mean by "dynamic property"; can you be more explicit?
    Your code creates two properties that can be read, written, and observed for changes, though it's probably better to use the standard naming scheme for the methods (e.g they should be getName(), setName(...) and nameProperty()).
    An ObservableMap is an extension of the java.util.Map interface that can be observed; i.e. you can register a listener that will be notified if a key-value pair is added or removed from the map.
    ObservableMapValue is an interface that defines an observable reference to an ObservableMap; i.e. it has a get() method returning an ObservableMap and a set(...) method taking an ObservableMap. You can register a ChangeListener which is notified when the set(...) method is called. It additionally functions as an ObservableMap, so you can also register listeners that get notified when key-value pairs are added or removed from the underlying observable map.
    MapProperty and MapPropertyBase are effectively partial implementations of ObservableMapValue. SimpleMapProperty is a full implementation.
    If you just need a single ObservableMap (i.e. not an observable reference to one), then the FXCollections.observableHashMap() factory method will provide one.

  • How to create a dynamic entry list for an input field in VC(ce 7.1)

    Hello all,
    I have an Input field, i need to create a Dynamic Entry List for it in VC(ce 7.1).
    How can this be done.
    Thanks in Advance.
    Thanks and Regards,
    Santhosh Guptha N

    Hi Santhosh,
    You can define Dynamic entry list for Drop down list and combo box but not for input field.
    [Refer this|http://help.sap.com/saphelp_nwce10/helpdata/en/2a/28249060dd4dbc872f6266f4557364/frameset.htm] for defining entry list.
    Let me know if it helped.
    Regards,
    Dharmi

  • Creating a dynamic Selection List based on a View Object

    Hello,
    I'm new to JDeveloper and I would like to create a JSP Page with dynamic Selection List based on a runtime query or based on a view object (BC4J). The selection made by an user should serve another dynamic query with the necessary parameters that I built using createViewObjectFromQueryStmt(). By now I tried this using the InputSelectLOV from the Component Palette in JDeveloper. But without success. By the way: the selection list is not very large (5 values), so it's not necessary to have a form finding the desired value.
    Maybe someone had experience about creating this already. Please give me a tip or a little example.
    Thanks.

    http://otn.oracle.com/products/jdev/howtos/jsp/renderers.html

  • Create a dynamic file list page

    I have two folders under my main heirachy for our web site.  One is called Prod and the other is Dev.  I have folders and irpts within them.  I would like to create an html filelist page so when I am on the web testing it, I can quickly see all of my files and click anyone of them to quickly see the page.  Does anyone know how to create dynamic file list pages that will automatically update as files and folders are added?

    You can always just enable "Directory Browsing" in the default web site in IIS.
    You can do this by opening IIS and navigating the PROPERTIES of the Default Website...click the Home Directory tab...check the "Directory browsing" box...apply the settings and you should be good.
    Note: a restart of IIS might be necessary for the changes to take effect. You can do this by executing a simple "iisreset" from the run command line.

  • How do I build a dynamic property list?

    It has been a long time and all my old Authorware stuff is in the shed somewhere. I want to dynamically build a property list statement in Authorware 7
    I figured it was something like property_list[1]["#"^variable_text]
    but this doesn't seem to be working so I just wanted to check I was using the correct syntax?

    Found some old code.
    I think you need to do
    property_text = "#"^variable_text
    then you can do the following
    property_list[1][property_text]
    That seemed to work.

  • How do you create a searchable property list?

    I am trying to create a searchable database of historic military figures. It will be a permanent list of people that will not change. I need to be able to search the list by first and/or last name and create a selectable list. Once a search list is created you can click on a name to display all the data on that person. Also there should be an option to browse the entire list. The original 1000 name list is provided in an excel document. I am having a brain freeze on this. Any examples would be helpful. Thank you!

    The simplest option might be to use a genuine database instead of a property list. For example, there's a free xtra from Valentin Schmidt for this (SQLite xtra)
    Otherwise, you might create a list of property lists, with named properties being keys to search on, something like:
    lData = []
    lPerson = ["firstname": "Stonewall", "lastname": "Jackson", "data": "Some data you wish to record against this person's name"]
    lData.append(lPerson)
    lPerson = ["firstname": "Robert", "lastname": "Lee", "data": "Some data you wish to record against this person's name"]
    lData.append(lPerson)
    -- etc…

  • Newbie: how to create a dynamic select list of the current date + 5 years

    Hi - I'm a JSP newbie (coming from a PHP background), and am trying to create a select list that contains the current year, plus 5 years. So, the list when generated (today), would display:
    2007
    2008
    2009
    2010
    2011
    2012
    Obviously, the code would need to generate inside the option tags, as well as in the value property of the option tag.

    function addit(){
              var val = 2012; //you can take this from js date object and strip it off
              for (var i=2007; i <= val;++i){
                   addOption(document.getElementById("mycombo"), i, i);
    function addOption(selectbox,text,value)
         var optn = document.createElement("OPTION");
         optn.text = text;
         optn.value = value;
         selectbox.options.add(optn);
    }without hardcoding:
    function addit(){
              var dd = new Date();
              var yearnow = dd.getFullYear();
              for (var i=yearnow; i <= yearnow + 5 ;++i){
                   addOption(document.getElementById("mycombo"), i, i);
    function addOption(selectbox,text,value)
         var optn = document.createElement("OPTION");
         optn.text = text;
         optn.value = value;
         selectbox.options.add(optn);
    in your jsp:
    <body onload="addit();">
    <form>
    <select name="mycombo">
    <option> Select year</option>
    </select>
    </form>
    </body>
    Message was edited by:
    skp71
    Message was edited by:
    skp71

  • Unable to create working dynamic distribution list based on manager

    Hi,
    I am struggling to create a working dynamic distribution group. I am following the instructions at http://help.outlook.com/en-gb/140/Dd264647.aspx.
    My intent is to create DDG's based on a user's manager and their job title. In my org, sales managers will typically have 3 teams reporting to them. In our AD, this would be marked by a 3-4 letter acronym in the job title field (CSO,DCO,SDCO).
    I am trying to create distribution groups for use by their manager by having the manager and job title item as the filter, using the following script:
    New-DynamicDistributionGroup -Name "GROUPNAME" -RecipientFilter {(RecipientType -eq 'UserMailbox') -and (manager -eq 'Managername') -and (title -eq 'ACRONYM')}
    As an aside, I am unable to find if the manager object should be an alias, upn or ad object. I've tried with all with no success.
    No matter what permutations of the above script I try, nothing seems to work. The group creates, but does not work at all.
    Any help you can provide would be very much appreciated!

    Hi Ed,
    I did try that, and as it turned out, I was using the wrong powershell from the start.
    The commands above are for Office 365, not on-prem Exchange 2013. Having spoken to Microsoft, it seems like the AD object for manager may not be a filterable option at all, I'm waiting to hear back.
    If this can help jog anyone's mind, the commands we're looking towards now look something like this:
    New-DynamicDistributionGroup -Name "testname" -Alias "testname" -IncludedRecipients "MailboxUsers,MailContacts" -OrganizationalUnit "domain.local/users" -ConditionalDepartment "Test" -RecipientContainer "domain.local"
    We're still looking for a filter for manager in there, and I'll update the thread if I get anything worthy of note. Bear in mind that it's going to be difficult to settle for anything less than the manager object to filter by, as our requirements pretty
    much demand it.
    Thanks all.

  • How to create a dynamically growing list in SAPUI5?

    Hi,
    I want to create a growing list in SAPUI5 like this http://help.sap-ag.de/saphelp_uiaddon10/helpdata/en/91/64ba7047b74a25a19baf9c5bb986ae/content.htm
    However, I want to hit a url to fetch data every time[10 rows on every load]. My JSON data contains more than 200 rows and I do not want to load everything when the app starts. Can you help me with your code for achieving this?
    Thanks
    Senthil Kumar

    Hi,
    Like I said, if it's an OData service call, then data is loaded from the server, and the amount of retrieved data specified by the threshold.
    if it is a simple REST / JSON service, then all data is loaded during the initial service call, but the list only shows (and grows) by what's specified at the threshold parameter.
    In other words, the real benefit of the growing list is when using OData services

  • Re-clarify--Urgent -- Can Apex create a dynamic menu list from table?

    Hi All,
    I am asked to investigate the possibility of using APEX to create a table data driven drop down menu, which means the menu list is dynimically generated from what is in the table. Eg. if there are 3 rows in the table, then the application will generate 3 list, if I add a row, then user will see 4 lists next time when the page is refreshed.
    Such menu list will need to be a home page, which means it is the first page to be called in the URL. If such function needs to be implemented in PL/SQL procedure, can the procedure be called in Apex's URL?
    The deadline is tomorrow and I have spent quite a bit of time but still have not had any clue. Could any one have such experience to point me a way to focus on please? Many thanks.
    Jennifer

    Hi All,
    I am asked to investigate the possibility of using APEX to create a table data driven drop down menu, which means the menu list is dynimically generated from what is in the table. Eg. if there are 3 rows in the table, then the application will generate 3 list, if I add a row, then user will see 4 lists next time when the page is refreshed.
    Such menu list will need to be a home page, which means it is the first page to be called in the URL. If such function needs to be implemented in PL/SQL procedure, can the procedure be called in Apex's URL?
    The deadline is tomorrow and I have spent quite a bit of time but still have not had any clue. Could any one have such experience to point me a way to focus on please? Many thanks.
    Jennifer

  • Can I create a dynamic (selectable) list

    Hi, I'm in the process of building a wedding website and within that I'd like to get a page dedicated to an alternative gift list. The list takes the form of Bricks & Mortar and has items (bricks, concrete, windows etc.) to build a new extension.
    Is there a way that I can build a page with the individual items listed alongside a box in which someone can enter a quantity of item/s to buy. Then if there were say 10 of that item it would show how many were left to buy after the purchase was completed?
    For example: 1000 Bricks x 10 Someone choses to buy 1 batch of 1000 bricks leaving 9 batches left on te list.
    Is this beyond the power of iWeb?

    Hi, I'm in the process of building a wedding website and within that I'd like to get a page dedicated to an alternative gift list. The list takes the form of Bricks & Mortar and has items (bricks, concrete, windows etc.) to build a new extension.
    Is there a way that I can build a page with the individual items listed alongside a box in which someone can enter a quantity of item/s to buy. Then if there were say 10 of that item it would show how many were left to buy after the purchase was completed?
    For example: 1000 Bricks x 10 Someone choses to buy 1 batch of 1000 bricks leaving 9 batches left on te list.
    Is this beyond the power of iWeb?

  • How can i Create Dynamic mailing lists with Iplanet Delegated Administrator

    Hello people,
    Could anyone help me in this matter please?
    I am running IMS5.2 with Netscape Directory4.16. I need help about how to create a Dynamic Mailing list using de Iplanet Delegated Administrator, not using the traditional Netscape Console.
    If someone can help me, i will apreciate.
    bye.
    Azim Lakha

    In 24.4.0 there is no File|New|Address Book. There is File|New|Address Book Contact. How do I create a new address book ?

  • Automatically add a dynamic property to a newly created table

    hi,
    how can i customize data modeler so that whenever a table/entity is created, a dynamic property named myprop1 is attached to it.
    and further more, i hope this dynamic property be included in the generated reports.
    thanks.

    Hi Srv-02,
    You can create a custom action to add Watermark for all the generated pdfs.
    You can also accomplish this via Javascript: https://acrobatusers.com/tutorials/watermarking-a-pdf-with-javascript
    Regards,
    Rave

Maybe you are looking for

  • Unable to capture 480i  SD from Sony HC1

    I must be doing something wrong. I want to capture video from my HC1 as SD 480i but all I get is firewire control. I have tried DV NTSC and DV NTSC Anamorphic with no results. My tape footage is HDV with the camcorder set to downconvert the iLink out

  • Page item rendering location relative to report?  (APEX 2.2.0)

    Hi all, What controls where the page items in a region containing a report will be rendered? I have two regions that (I thought) I set up identically, but one has the items above the report and the other below. The only difference between them is tha

  • Flex 3 dashboard

    Hi, I have an application in which I am using the flex 3 dashboard developed by WASI(http://www.adobe.com/devnet/flex/samples/dashboard/dashboard.html). In my application,I have to position 3 pods. The code would display these pods as: -  Pod 1  -  -

  • About DAQ task and writing to a line

    Hi all,   I swtich from Labview to Labwindows and switch from traditional DAQ to DAQmx. I have two questions about using the DAQmx. Based on the example from NI, I write a function for a single sample output to a single digitial line void WriteLine(i

  • HELP! iPHOTO publish button is greyed out :(

    I don't know what to do . . .  It just happened all of the sudden. I have version 10.6.8 . . . please help!!! I have all of my pics on my laptop and want to upload them to FB . . . Can anyone help me?!?!?!?!?! Thank you so much!