In the model group data when list account data then 1 shows in the list field

I have a Xml file contacts.xml, which is contained below...



1
SR Editor.
Mike
Chepesky


In the PRC, I do just code below

GroupDataModel * model = new GroupDataModel();
XDA XmlDataAccess;
QVariant list = xda.load)
QDir::currentPath() + "/ app/native/assets/contacts.xml."
(' / contacts/contact ");

model-> insertList (()) list.value;

QStringList key;
key<>
model-> setSortingKeys (key);
model-> setSortedAscending (FALSE);

listView-> setDataModel (model);

When this XML have more then a refrigerated then given show in the listview, but when a refrigerated data does not show.

Please help me...

MOD Edit: Remove information staff to comply with the Community guidelines and the terms and Conditions of use.

Hi Sumitava_Datta,

Please report this issue in jira (developer Issue Tracker).

I confirm this Zmey solution work. I tried it myself and it indeed gives a solution to this bug. Just use isEmpty() instead of isNull(), who is not recognized as a valid QVariantList function.

QVariant list = xda.load(
QDir::currentPath() + "/app/native/assets/contacts.xml",
"/contacts/contact");

QVariantList l = list.value();
if (l.isEmpty())
  model->insert(list.value());
else
  model->insertList(list.value());

Tags: BlackBerry Developers

Similar Questions

  • Group data model does not

    Hello

    I am developing a revision update for my app BB10 stunts and I use a data model to pull in the elements of the application do not forget; the only problem I encounter is that I can't get the data model of the group work so that I can arrange the items by the first character instead the data are currently presented as Z - A, even if I could get it to display in A - Z would be enough, but what I am looking to achieve is to get the model to display in A - Z and then sort by the first character, while a header for each letter is displayed.

    Here is the list (QML) and my data model (C++)

    ListView {
                                dataModel: _noteBook.model
    
                                listItemComponents: ListItemComponent {
                                    type: "item"
    
                                    StandardListItem {
                                        title: ListItemData.title
                                        description: ListItemData.status
                                    }
                                }
    
                                onTriggered: {
                                    clearSelection()
                                    select(indexPath)
    
                                    _noteBook.setCurrentNote(indexPath)
    
                                    _noteBook.viewNote();
                                    navigationPane.push(noteViewer.createObject())
                                }
                            }
    

    NoteBook.cpp

    #include "NoteBook.hpp"
    
    #include "NoteEditor.hpp"
    #include "NoteViewer.hpp"
    
    #include 
    
    using namespace bb::cascades;
    using namespace bb::pim::notebook;
    
    //! [0]
    NoteBook::NoteBook(QObject *parent)
        : QObject(parent)
        , m_notebookService(new NotebookService(this))
        , m_model(new GroupDataModel(this))
        , m_noteViewer(new NoteViewer(m_notebookService, this))
        , m_noteEditor(new NoteEditor(m_notebookService, this))
    {
        // First Character grouping in data model
        m_model->setGrouping(ItemGrouping::FirstChar);
    
        // Ensure to invoke the filterNotes() method whenever a note has been added, changed or removed
        bool ok = connect(m_notebookService, SIGNAL(notebookEntriesAdded(QList)), SLOT(filterNotes()));
        Q_ASSERT(ok);
        ok = connect(m_notebookService, SIGNAL(notebookEntriesUpdated(QList)), SLOT(filterNotes()));
        Q_ASSERT(ok);
        ok = connect(m_notebookService, SIGNAL(notebookEntriesDeleted(QList)), SLOT(filterNotes()));
        Q_ASSERT(ok);
    
        // Fill the data model with notes initially
        filterNotes();
    }
    //! [0]
    
    //! [1]
    void NoteBook::setCurrentNote(const QVariantList &indexPath)
    {
        // Extract the ID of the selected note from the model
        if (indexPath.isEmpty()) {
            m_currentNoteId = NotebookEntryId();
        } else {
            const QVariantMap entry = m_model->data(indexPath).toMap();
            m_currentNoteId = entry.value("noteId").value();
        }
    }
    //! [1]
    
    //! [2]
    void NoteBook::createNote()
    {
        // Prepare the note editor for creating a new note
        m_noteEditor->reset();
        m_noteEditor->setMode(NoteEditor::CreateMode);
    }
    //! [2]
    
    //! [3]
    void NoteBook::editNote()
    {
        // Prepare the note editor for editing the current note
        m_noteEditor->loadNote(m_currentNoteId);
        m_noteEditor->setMode(NoteEditor::EditMode);
    }
    //! [3]
    
    //! [4]
    void NoteBook::viewNote()
    {
        // Prepare the note viewer for displaying the current note
        m_noteViewer->setNoteId(m_currentNoteId);
    }
    //! [4]
    
    //! [5]
    void NoteBook::deleteNote()
    {
        m_notebookService->deleteNotebookEntry(m_currentNoteId);
    }
    //! [5]
    
    bb::cascades::GroupDataModel* NoteBook::model() const
    {
        return m_model;
    }
    
    QString NoteBook::filter() const
    {
        return m_filter;
    }
    
    //! [6]
    void NoteBook::setFilter(const QString &filter)
    {
        if (m_filter == filter)
            return;
    
        m_filter = filter;
        emit filterChanged();
    
        // Update the model now that the filter criterion has changed
        filterNotes();
    }
    //! [6]
    
    NoteViewer* NoteBook::noteViewer() const
    {
        return m_noteViewer;
    }
    
    NoteEditor* NoteBook::noteEditor() const
    {
        return m_noteEditor;
    }
    
    //! [7]
    void NoteBook::filterNotes()
    {
        NotebookEntryFilter filter;
    
        // Use the entered filter string as search string
        filter.setSearchString(m_filter);
    
        const QList notes = m_notebookService->notebookEntries(filter);
    
        // Clear the old note information from the model
        m_model->clear();
    
        // Iterate over the list of notes
        foreach (const NotebookEntry ¬e, notes) {
            // Copy the data into a model entry
            QVariantMap entry;
            entry["noteId"] = QVariant::fromValue(note.id());
            entry["title"] = note.title();
            entry["status"] = NoteViewer::statusToString(note.status());
    
            // Add the entry to the model
            m_model->insert(entry);
        }
    }
    //! [7]
    

    NoteBook.hpp

    /* Copyright (c) 2012, 2013  BlackBerry Limited.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
    * http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    
    #ifndef NOTEBOOK_HPP
    #define NOTEBOOK_HPP
    
    #include 
    #include 
    #include 
    
    #include 
    
    class NoteEditor;
    class NoteViewer;
    
    /**
     * @short The controller class that makes access to notes available to the UI.
     */
    //! [0]
    class NoteBook : public QObject
    {
        Q_OBJECT
    
        // The model that provides the filtered list of notes
        Q_PROPERTY(bb::cascades::GroupDataModel *model READ model CONSTANT);
    
        // The pattern to filter the list of notes
        Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged);
    
        // The viewer object for the current note
        Q_PROPERTY(NoteViewer* noteViewer READ noteViewer CONSTANT);
    
        // The editor object for the current note
        Q_PROPERTY(NoteEditor* noteEditor READ noteEditor CONSTANT);
    
    public:
        NoteBook(QObject *parent = 0);
    
    public Q_SLOTS:
        /**
         * Marks the note with the given @p indexPath as current.
         */
        void setCurrentNote(const QVariantList &indexPath);
    
        /**
         * Prepares the note editor to create a new note.
         */
        void createNote();
    
        /**
         * Prepares the note editor to edit the current note.
         */
        void editNote();
    
        /**
         * Prepares the note viewer to display the current note.
         */
        void viewNote();
    
        /**
         * Deletes the current note.
         */
        void deleteNote();
    
    Q_SIGNALS:
        // The change notification signal for the property
        void filterChanged();
    
    private Q_SLOTS:
        // Filters the notes in the model according to the filter property
        void filterNotes();
    
    private:
        // The accessor methods of the properties
        bb::cascades::GroupDataModel* model() const;
        QString filter() const;
        void setFilter(const QString &filter);
        NoteViewer* noteViewer() const;
        NoteEditor* noteEditor() const;
    
        // The central object to access the notebook service
        bb::pim::notebook::NotebookService* m_notebookService;
    
        // The property values
        bb::cascades::GroupDataModel* m_model;
        QString m_filter;
    
        // The controller object for viewing a note
        NoteViewer* m_noteViewer;
    
        // The controller object for editing a note
        NoteEditor* m_noteEditor;
    
        // The ID of the current note
        bb::pim::notebook::NotebookEntryId m_currentNoteId;
    };
    //! [0]
    
    #endif
    

    If something you can help me with then this would be very useful - if you need to see more of code then let me know too!

    Thanks in advance

    Try to add in constructor (after a call to setGrouping):

    QStringList keys;
    key<>
    m_model-> setSortingKeys (keys);

    May require alterations, I have not tried this compilation.

  • view the json data in the custom list field

    Hi, I did analysis json and I created the custom list field. Now, I want to display only the data analyzed in my custom list field. I'll post my analyzed data from json and here is the code for my custom list field
    data analyzed.
    I have THREE channels of json and I want to show content tittle and date in the list filed. I'll post the screenshot of my list.

    JSONArray jsnarry = new JSONArray(responce);
                System.out.println("\n--length----- "+jsnarry.length());
                //System.out.println("....................................................=");
                for (int i = 0; i < jsnarry.length(); i++){
    
                    JSONArray inerarray = jsnarry.getJSONArray(i);
                        //System.out.println("\n-inerarray-values----- "+inerarray.getString(i1));
                        String TITTLE = inerarray.getString(1);
                        String CONTENT = inerarray.getString(2);
                        String DATE = inerarray.getString(3);
                                                           System.out.println("TITTLE= "+TITTLE);
                        System.out.println("CONTENT= "+CONTENT);
                        System.out.println("DATE= "+DATE);
    
    }
    

    output

    [0.0] --length----- 2
    [0.0]
    [0.0] -innerarray-length----- 6
    
    [0.0] TITTLE= BJP State President Sanjay Tandon's visit to Amita Shukla's Home
    [0.0] CONTENT=  BJP President Chandigarh Sanjay Tandon at Amita Shukla's Home
    [0.0] DATE= 2013-01-04
    [0.0] ................................................
    [0.0] TITTLE= Sanjay Tandon at mahasamadhi of Satya Shri Sai baba.
    [0.0] CONTENT= BJP Chandigarh President, Sanjay Tandon mahasmadhi of Sri Satya Sai Baba.(Andhra Pradesh)
    [0.0] DATE= 2013-01-13
    

    and my custom list field

           super(NO_VERTICAL_SCROLL);
    
             String TITTLE="TITTLE";
             String CONTENT = "CONTENT";
             String DATE = "DATE";
    
             v.addElement(new ListRander(listThumb, TITTLE, CONTENT,DATE, navBar));
    
             myListView = new CustomListField(v){
    
                 protected boolean navigationClick(int status, int time) {
                     //Dialog.alert(" time in milisec :" + time);
                     return true;
                 }
             };
    

    CustomListField.java

    public class CustomListField extends ListField implements ListFieldCallback {
    
        private Vector _listData;
        private int _MAX_ROW_HEIGHT = 100;
    
        public CustomListField (Vector data) {
    
            _listData = data;
            setSize(_listData.size());
            setSearchable(true);
            setCallback(this);
            setRowHeight(_MAX_ROW_HEIGHT);
    
        }
    
        public int moveFocus (int amount, int status, int time) {
    
            this.invalidate(this.getSelectedIndex());
            return super.moveFocus(amount, status, time);
    
        }
    
        public void onFocus (int direction) {
    
            super.onFocus(direction);
    
        }
    
        protected void onUnFocus () {
    
            this.invalidate(this.getSelectedIndex());
    
        }
    
        public void refresh () {
    
            this.getManager().invalidate();
    
        }
    
        public void drawListRow (ListField listField, Graphics graphics, int index, int y, int w) {
    
            ListRander listRander = (ListRander)_listData.elementAt(index);
            graphics.setGlobalAlpha(255);
            graphics.setFont(Font.getDefault().getFontFamily().getFont(Font.PLAIN, 24));
            final int margin =5;
    
            final Bitmap thumb= listRander.getListThumb();
            final String listHeading = listRander.getListTitle();
            final String listDesc= listRander.getListDesc();
            final String listDesc2= listRander.getListDesc2();
            final Bitmap nevBar = listRander.getNavBar();
    
            //list border
            graphics.setColor(Color.BLACK);
            graphics.drawRect(0, y, w, _MAX_ROW_HEIGHT);
    
            graphics.drawBitmap(margin, y+margin+10, thumb.getWidth(), thumb.getHeight(), thumb, 0, 0);
    
            graphics.drawText(listHeading, 3*margin+thumb.getWidth(), y+margin);
            graphics.setColor(Color.BLACK);
    
            graphics.drawText(listDesc, 3*margin+thumb.getWidth(), y+ margin+30);
            graphics.drawText(listDesc2, 3*margin+thumb.getWidth(), y+ margin+60);
    
        }
    
        public Object get(ListField listField, int index) {
    
            String rowString = (String) _listData.elementAt(index);
            return rowString;
    
        }
    
        public int indexOfList (ListField listField, String prefix, int start) {
    
            for (Enumeration e = _listData.elements(); e.hasMoreElements(); ) {
    
                String rowString = (String) e.nextElement();
                if (rowString.startsWith(prefix)) {
    
                    return _listData.indexOf(rowString);
    
                }
    
            }
    
            return 0;
    
        }
    
        public int getPreferredWidth(ListField listField) {
    
            return 3 * listField.getRowHeight();
    
        }
    
    }
    

    Listrander.Java

    public class ListRander {}

    private bitmap listThumb = null;
    incognito bar Bitmap = null;
    private String listTitle = null;
    private String listDesc = null;
    private String listDesc2 = null;

    public ListRander (Bitmap listThumb, String listTitle, String listDesc, String listDesc2, Bitmap navBar) {}
    this.listDesc = listDesc;
    this.listDesc2 = listDesc2;
    this.listThumb = listThumb;
    this.listTitle = listTitle;
    this.navBar = bar navigation;
    }
    public getListThumb() {Bitmap image
    Return listThumb;
    }
    {} public void setListThumb (listThumb Bitmap)
    this.listThumb = listThumb;
    }
    public getNavBar() {Bitmap image
    return the navigation bar;
    }
    {} public void setNavBar (navigation bar of the Bitmap)
    this.navBar = bar navigation;
    }
    public String getListTitle() {}
    Return listTitle;
    }
    {} public void setListTitle (String listTitle)
    this.listTitle = listTitle;
    }
    public String getListDesc() {}
    Return listDesc;
    }
    {} public void setListDesc (String listDesc)
    this.listDesc = listDesc;
    }
    public String getListDesc2() {}
    Return listDesc2;
    }
    public void setListDesc2 (String listDesc2) {}
    this.listDesc2 = listDesc2;
    }
    }

    You seem to have two problems here and are confusing them.  You must break the problem into two parts

    (1) extract the data from the entry and create the objects you want to display

    2) display in a list, a set of objects.

    Let's get the sorted first premiera.

    I will suggest what to do here, but in practice, you might actually think about this yourself as part of the design phase of your application.  You should do this, not me, because then you will have all the information available.  At the present time, I have just what you said, which is not much.  So maybe what I'm telling you is not correct for your application.  Only you can decide that.  And be blunt here, you should have decided this before you start coding.  Do you want you could lead down the wrong path.  You must think of your application as a home - as the architect must design all the rooms, and how they will be built, before you start building the House.  You do not, then we are building the rooms on the fly.  Who knows if they will be fit at home?

    In this case, I think you need to create an object that represents each of the elements in the internal array of new data.  call this object

    NewsItem

    This object will have attributes, such as its title, content, date, the linked image and so on, each of whom have will get and set methods.  While you treat each inner element fetch you the associated entry and update the object.

    When you have finished the inner loop of processing, you now have a complete

    NewsItem

    Object, so you will add it to a collection, an array of NewsItem objects, call this _newsItems.  You will create it at the beginning - you know how many entries it takes because it is the number of entries in your outdoor table.

    So before you start to deal with JSON, create your table and the 'index' value of 0.

    Once you have created your Newsitem, add this in the table to the position 'index' and increment "index".

    And once you have analyzed all the JSON, you will have a complete picture.  This is part 1 finished!

    And note in your drawListRow, you are given a clue - that is the index in your tables in _newsItems.  So you can easily find which entry to view and display it correctly.  But it is part 2 and is a separate issue.

  • When I deleted and then recreated the same account that all emails are now gone. Where did they go?

    I had problems with getting mail from my verizon email account. All of a sudden stopped working when checking mail. The transmission was fine. No server settings have been changed. Then as a final trial before the nightmare to finally give them, I removed the account and then set up again. I now get the emails, but all the 'old' disappeared. Where did they go?

    I read all the messages on the verizon smtp ssl problems but this (lack of e-mails that have been alreadiny in thunderbird) seems to be a matter of TB.

    Any help would be much appreciated.

    Jack

    I don't think so.
    If you think it's a problem to check with your email provider.

  • I formatted a hard drive of 250 GB using ntfs and the data stored on it, my old hard drive died, so he was replaced now when I go into windows, it shows the drive as raw what happened?

    The old hd wd swarmed so it has been removed, a new one installed Windows xp now when I go into windows, it shows the active partition, but no system file and when you try to access it, says I need to format the hard drive, what happened to all the data that I had before?

    I found a program to retrieve all the data myself using easeus.com

  • I disconnected from the home group, but when I try to join the homegroup I can't because I put a password and I forgot the password. What should I do?

    Hello. I disconnected from the home group, but when I try to join the homegroup I can't because I put a password and I forgot the password. What should I do? TQ

    Hello. I disconnected from the home group, but when I try to join the homegroup I can't because I put a password and I forgot the password. What should I do? TQ

    Where can I find my homegroup password?

  • I recently bought two pictures for my youth group. When I looked behind them image is a larger image, but, when I downloaded it it's a smaller image. How can I get the enlarged image?      #93598775 &amp; #18109349

    I recently bought two pictures for my youth group. When I looked behind them image is a larger image, but, when I downloaded it it's a smaller image. How can I get the enlarged image?#93598775 & #18109349

    Follow these steps: I downloaded my 10 free images and they all have the Adobe watermark on them, so I can't use them. Why do they have a watermark on them?

  • I bought the app composition unique creative cloud for acrobat.  When I log into my account it does not show that I bought.  How can I get the download to work without buying again.  I have a receipt for my purchase.

    I bought the app composition unique creative cloud for acrobat.  When I log into my account it does not show that I bought.  How can I download this product without buying it again.  I received my purchase.

    Hello

    Please check the help below document:

    Applications creative Cloud back in test mode after an update until 2015 for CC

    Kind regards

    Sheena

  • How to fill a field of date with today's date when the signature field is signed?

    How to fill a field of date with today's date when the signature field is signed? In the LCD, I insert a signature field and a date field, what parameters in these two fields are necessary to make this work? Is the date field, the value calculated? I tried different JS suggestions I found, but none work. In the form, I named the signature ClaimSignature field and the date in the ClaimSigDate field.

    The thought of her with a little help. In the script editor window, I selected the postSign event and added the following JS:

    Form1.Page1.ClaimSignature::postSign - (JavaScript, client)

    var date = new Date();

    var day = date.getDate ();

    var month = date.getMonth () + 1;

    var monthstring = (month, 10?) ('0' + month: month)

    year var = date.getFullYear ();

    var = year DateString + '-' + monthString + '-' + (day< 10="" "0"="" +="" day="" :="">

    ClsimSigDate.rawValue = dateString;

    I hope this helps someone else save time.

  • Not able to read the values in group by, when no records in the table

    Hi all, I have this query

    Select p.header_id,

    Type "some_constant."

    sum (nvl (p.total_amount, 0)) sum_of

    from table_name p

    P.header_id group

    When there is record in the table, it works fine, but I want to if there is no any folder that it returns as below,

    header_id type sum_of

    some_constant 0 0

    How to...?

    Help, please.

    Kind regards

    SELECT * FROM (select p.header_id,

    Type "some_constant."

    sum (nvl (p.total_amount, 0)) sum_of

    from table_name p

    P.header_id group

    UNION ALL

    SELECT 0,

    BOX WHEN (SELECT COUNT (*) FROM table_name) = 0 THEN type of 'some_constant',

    ANOTHER NULL

    END type as,

    0

    THE DOUBLE)

    WHERE type IS NOT NULL;

    Post edited by: 000000

  • I created a PDF form with several drop downs, all with the same drop-down values. When I select a value of 1 in the drop-down list fields, it breeds in all others - which I don't want. How can I fix?

    I created a PDF form with several drop downs, all with the same drop-down values. When I select a value of 1 in the drop-down list fields, it breeds in all others - which I don't want. Can I fix?

    I am fairly new to this, but I think it has to do with the way you have drop them downs named. Copy you a then keep stick in each area? If so, that's the problem. You must rename each with a different number: Dropdown1, Dropdown2, etc. I think this might solve the problem.

  • How do I automatically populate the text field box based on data generated automatically in the drop-down list?

    I created a drop down list which includes various regions.  When a region is selected it auto-renseigne another drop-down list with places.  I would like to automatically fill a text field with predetermined phone numbers when you have selected a location in the drop-down list of "places".  I want to integrate the phone numbers in the code, since the form will not access a database.  Any help would be greatly appreciated.  Thank you, Ed.

    Hello

    Here is the link to your form. https://Acrobat.com/#d=BaCL7BKKdAcgV3JIk61nZg

    You have the updated field matches in the event changes from the 2nd menu drop-down.

    While referencing you use .page1 while your page is Page1.

    Thank you.

    Sidonie.

  • How to create the trigger WHEN-LIST-CHANGED to the text at the level of the item element

    Hi all
    I have a requirement that is to say that I developed on the form that contains an emp (empno, sal, job) details in the field of the form.job table (text element) contains lov. My requirement is when I select values in the lov it must create a new record in this tabular form. I did ' t get trigger WHEN-LIST-CHANGED at the level of the element for the work of i.e text point.

    I tried this requirement by making the point of work as working fine.i of an item.it list used NEXT-ITEM KEY also to make the this.but is not our business requirements.

    When lov changes he needs to create a new line.

    How we do that. Can someone give me an idea please

    Thank you

    Hello
    In the text element, you can use trigger KEY-LISTVAL and try to use the code as...

    LIST_VALUES;
    IF :FORM.ITEM_NAME IS NOT NULL THEN
      CREATE_RECORD;
    END IF;
    

    When list change trigger only for the LIST_ITEMS and fires when you try to change the list_item

    -Clément

  • When I change any thng... then it shows access is denied... bz in c and d drive all thngs under the Security tab has been denied... _

    is Security tab..tht thngs that may access are changed for refusal...

    so please now tell me how to access all the operations of tht... bz if I open c or d drive... it shows access is denied...

    and it shows in his propertis... u must b an administrative user to display the object properties say security... bt m even not able to make changes in the properties of the account...

    ND if I try to open the USB... it does not get approval to open.

    Please hlp me to...

    Hi jitain,

    1. did you of recent changes on the computer?

    2. do you have security software installed on the computer?

    This would happen if the settimgs of security on the computer have been modified.

    Method 1

    I suggest that you reset the default security settings and check.

    How to restore the security settings the default settings?

    http://support.Microsoft.com/kb/313222

     

    Method 2

    If the previous step fails, then you will need to provide manuully of file permissions or folder.

    To apply permissions to a file or a folder

    (a) right click on the file or folder and then click Properties.

    (b) click on the Security tab, and then click Edit.

    (c) do one of the following:

    1. If you want to set permissions for a user who is not listed under group or user names, click Add, type the name of the user or group, click OK, select permissions and then click OK.

    2. to change or remove permissions for a user or an existing group, click the name of the user or group, select the permissions and then click OK.

    What to know before applying permissions to a file or folder

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-to-know-before-applying-permissions-to-a-file-or-folder

    Troubleshoot "access denied" when opening files or folders

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-access-denied-when-opening-files-or-folders

    I hope this helps!

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Fill a field of text according to what is selected in the item list field

    I have a form that contains a ROOM_REF field that is a list item and a ROOM_DESC field that is a text element. (among other things).

    When the user selects in the ROOM_REF area (which is populated by a group of archives at the start),
    I want it to automatically fill in the ROOM_DESC field with data (read-only).

    What type of trigger that I use and with what code?

    Something like:

    SELECT ROOM_DESC FROM ROOM WHERE ROOM_REF =: SESSION. ROOM_REF;

    Thank you

    Have you tried this code in the trigger of WHEN-LIST-list item CHANGE.

    SELECT ROOM_DESC IN: ROOM_DESC OF THE ROOM WHERE ROOM_REF =: SESSION. ROOM_REF;

    -Clément

Maybe you are looking for