Display items based on Orderby field

HI,
I have a custom list, in which I have columns like "DisplayOrder", "Title", "Value". I am showing the contents of the list in a div in a custom webpart (javascript client object model).
The data are loading, but is not following the "DisplayOrder".
Example: In the custom list, I have data as below:
Title Value DisplayOrder
One ab 2
Two cd 3
Three ef 1
I have used the below code in Javascript client object model:
function loadConfigData() {
var configquery = new SP.CamlQuery();
configquery.set_viewXml('<View> <Query> <OrderBy><FieldRef Name="DisplayOrder" /></OrderBy> </Query> <ViewFields><FieldRef Name="Title" /><FieldRef Name="Value" /><FieldRef Name="DisplayOrder" /></ViewFields> </View>');
this.Allitems = oSubList.getItems(configquery);
clientContext.load(Allitems);
clientContext.executeQueryAsync(Function.createDelegate(this, this.NewConfigsuccess), Function.createDelegate(this, this.Configfailed));
function NewConfigsuccess() {
var right = 30;
var count = this.Allitems.get_count();
if (count >= 1) {
var configenumerator = this.Allitems.getEnumerator();
while (configenumerator.moveNext()) {
var currentItem = configenumerator.get_current();
var iTitle = currentItem.get_item('Title');
var iValue = currentItem.get_item('Value');
var newText = "";
if (iTitle!= null && iTitle != "" && iValue != null & iValue != "") {
newText = '<table class="tblContent"><tr><td class="tblLeftContent"><a style="color:white;" href="' + captionURL + '"> <img src="/_layouts/15/Images/bannertest.png" alt="' + iTitle + '"/></a></td>';
newText = newText + '<td class="tblRightContent"><div class="middlecontent"><a style="color:white;" href="' + iValue + '">' + iTitle+ '</a></td></div></tr></table>';
listdata = listdata + '<div class="BottomTitleBanner" style="right:' + right + 'px;">' + newText + '</div>';
right = right + 105;
Here, I want the data to load as "Three", "One" , "Two".
How to fix this?
Thanks

function GetListItem() {
$.ajax({
type: "GET",
headers: {
"accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose",
url: "http://XXXXXX/_api/web/Lists/getbytitle('OrderList')/Items?$select=Title,Test&$orderby=Test asc",
success: function (data) {
$.each(data.d.results, function (index, item) {
$('#oDataSuppliers').append("<li>" + "<h1>" + item.Test + "</h1>" + "</li>");
failure: function (data) { console.log(data); }
You can get the column order like this

Similar Messages

  • Need help displaying item based on pl/sql anonymous block

    This is probably something really simple but I'm stuck.....
    On purchase order, I want to show related parent project name and ID. What is the best way to do it? I have created a region based on pl/sql anonymous block, and that works, but the data is above where I want it. I want the project name and ID to show up in the region w/ all the other fields.
    I have created an item in the region that has other form fields, item is based on pl/sql anonymous block, w/ same code as above region, and the item doesn't find the data. What's the difference? Is it because the item doesn't save state? In order to choose for the item to be based on pl/sql anon block, APEX made me choose Display as Text (based on PLSQL, does not save state).
    Please see this picture:
    http://farm3.static.flickr.com/2391/2658673285_04f157a3fa_o.png
    thanks!
    ~Darby

    this is weird.. Now it is working. I didn't change anything! What the heck?
    http://farm3.static.flickr.com/2010/2659557520_73e54b67ea_o.png

  • How to sort web app items based on few fields of it on search result page?

    I have a web app and its search. The search results are on multiple pages means it has pagination. My client's requirement is to have a feature which will sort results based on some web app items. for example we have a field price so when user select the price it needs to sort from high to low. Any one have idea how to do it?

    I have just been playing around with this for something else, all you need to do is duplicate your price field into the weighting field and it will automatically sort from High to low for you.
    Cheers
    Duncan

  • Displaying items based on Query record count (Forms 4.5)

    I have a special requirement.
    Assume col1 that I am selecting from table temp.
    select col1 from temp;
    Now if query fetches 9 records.
    Each column I want to show like this.
    1 2 3 4 5 6
    7 8 9
    If query fetches 15 records.
    Each column I want to show like this.
    1 2 3 4 5 6
    7 8 9 10 11 12
    13 14 15.
    That means items displayed on screen chages based on output of
    query.
    Pls. suggest some solution.
    null

    When i made the above query a view and created an oracle portal form. I get this error when I try to retrieve all the records in that view i made above.
    An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
    What does the "key-preserved table" mean?

  • Displaying items based on Query record count

    I have a special requirement.
    Assume col1 that I am selecting from table temp.
    select col1 from temp;
    Now if query fetches 9 records.
    Each column I want to show like this.
    1 2 3 4 5 6
    7 8 9
    If query fetches 15 records.
    Each column I want to show like this.
    1 2 3 4 5 6
    7 8 9 10 11 12
    13 14 15.
    That means items displayed on screen chages based on output of
    query.
    Pls. suggest some solution.
    null

    You can't do this with the custom search portlet.
    You can use Omniportlet to display the items - using the SQL datasource (new in the July PDK) to query the content repository views. You could use the parameter form portlet provided with Omniportlet to build the selection list.
    Regards,
    Jerry
    PortalPM

  • Conditionally display items based on null LOV value

    Hello,
    I've seen several examples that do what I'd like to do but with different implementations. Perhaps someone can steer me in the right direction...
    I have a pop-up lov that pulls a list of names from various places. If, however, the name cannot be found I'd like to display a few text boxes where the user can enter a new name.
    For my list of values I have configured the following:
    Display Null: Yes
    Null Return Value: -1
    Null Display Value: Not Found
    My HTML Form Element Attributes has: onchange="doSubmit()";
    My Source section has:
    Source Used: Only when current value in session state is null
    Source Type: Static Assignment (value equals source attribute)
    My entry text boxes have a condition specified:
    Value of Item In Expression1 = Expression 2
    Expression 1: P4_LOOKUP_NAME
    Expression 2: -1
    I also have an unconditional branch to this same page (Page 4) that sets the value of P4_LOOKUP_NAME to P4_LOOKUP_NAME.
    I cannot seem to get this item to display though...any thoughts?
    Thanks in advance for your suggestions!

    jhammer,
    I like the concept. This would require a custom popup lov - something that can be a little tricky/time consuming the first time around. The popup lov would probably have to create new entries via Ajax to be able to pass back the correct ID/display values to the parent window on close.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Formula to Display Value Based on Another Field's Value

    Hello,
    I have a column that displays the vehicle used for drives, but the report also lists fixed sites that do not have a vehicle assigned.
    What I'm trying to accomplish is to utilize a formula but I'm having trouble with getting it to work. What I've got is:
    if {CenterDetail.CenterType}=0 then {MobileSetupMaster.ShortDesc}
    else
    I'm not sure what to place in the else statement to make the value equal to null.
    Suggestions?

    hi Trey,
    are you just trying to show an empty formula or an actual null.
    if empty, then
    if {CenterDetail.CenterType}=0 then {MobileSetupMaster.ShortDesc}
    else ""
    will work.

  • Bank Reconciliation based on assignement field

    Hi,
    During execution of bank reconciliation, system is clearing opoen items based on amount(WRBTR). The requirements is to clear the open items based on assignment field.
    I have not maintained any algorithm for transaction types.
    Let me know the setting thru which the open items will be cleared based on assignemnt.
    Thanks,
    Ajay

    Hi Ravi,
    Thanks for the reply. I am entering Transaction code / Value date / Amount / Profit center / Allocation Number / Cost center.
    What you have rightly mentioned is right. System picks up WRBTR for clearing, if it finds the amount it clears the same. My requirement is to clear the transaction firstly based on ZOUNR & then based on WRBTR.
    If not so, can I have the setting done where in system will first look for WRBTR. If more than one entry is found, it will shift to next criteria of ZOUNR & clear the document. I have already maintained OB74.
    Thanks,
    Ajay

  • Custom search for Catalog based on UDF fields combination

    Can we customize in OIM 11g R2 PS1 to search catalog items based on multiple fields (similar to User search scenarios). If someone has to search based on combination of 2-3 custom attributes e.g. UDF fields , is it possible ? do we need to do complex changes in code through Catalog APIs ?
    Edited by: Shashi kiran on May 15, 2013 9:45 AM
    Edited by: Shashi kiran on May 15, 2013 9:49 AM

    In my scenario , i have to customize catalog search with combination of 2-3 attributes including UDF attributes with standard attributes (Application Instance, Role and Entitlement). As, these 3 attributes (Application Instance, Role and Entitlement) are by default out of box ,present for catalog search we can use their combination for catalog search.
    But, what if along with these standard attributes ,if there are other custom attribute like UDFs (e.g. : Sub application,Domain,etc) in combination ?
    Is this customization for catalog search is possible through UI or do we have to make changes in Source Code exposing catalog APIs to work this scenario out ?
    Edited by: Shashi kiran on May 16, 2013 12:06 PM

  • How to display F4 values in one field based on other field selection

    Hi All,
    How to hide a UI element (i.e Link to action) highlited for Normal User and display the same to super user.
    Component Name : /SAPSRM/WDC_DODC_SC_GAF_C
    2.Can i know how to display  the entries in supplier field based on Product category selection.
    Right now all the entries are getting displayed in the supplier field.
    I want to display only entries based on Product category.
    Search Help Name : BBP_BUPA_CLL_PARTNER
    Component Name : /SAPSRM/WDC_DODC_SC_I_LIM
    How to enhance the web dynpro component with the filtered values.
    Regards,
    Krish.

    Hi Ashvin,
                 Thanks for the document. In the search help there is a standard FM which is getting executed.
    Can i enhance that FM or should i copy and edit.
    BBP_F4IF_SHLP_EXIT_CLL_PARTNER
    If i creata a Z FM and make changes how to pass that values to my standard Component View UI Element.
    If not then suggest me some alternative.
    Regards,
    Krish

  • How to show limited items based on a custom field

    Is there a way to show only web app items based on the custom date field? For example, i want the module to only show web app item(s) whose "event date" is "today"....  ?? Help please!

    There has to be a jQuery plugin that can help you do that... just search on Google, Stackoverflow, etc...
    There's one that SimpleFlame wrote via Kiyuko but it's a premium offering:
    http://kiyuco.com/tutorials/create-a-web-app-driven-event-calendar

  • How to display f4 help for a field based on value of another field

    Hello All,
    I have 4 fields : Sales Org : VBAK-VKORG, Distrib Channel : RV50A-VTWEG, Div : RV50A-SPART, Sold-to-party : KUAGV-KUNNR.
    The second field depends on the first one, the third on the second one and the fourth on the first field.
    However, when each of the second third and fourth fields' f4 help is displayed, the values are independent of the previous fields. How do I set the f4 help to display values based on the respective fields?
    Regards,
    Mithun

    Please be sure that you are searching the forums before posting. This exact same question was asked just yesterday:
    F4 help to input field
    In particular study the section and the linked help document for ddic search helps export/importing parameters and the requirements for DDic Structure/table usage for the parameter mapping.

  • Display list items based on another list item

    Hi All
                I want to display the list item based on another list item, but its not working.
    This is my code:
    /*WHEN-NEW-FORM-INSTANCE*/---Its working.
    DECLARE
       rg_district   recordgroup;
       rg_name       VARCHAR2 (40) := 'district';
       vtemp         NUMBER;
    BEGIN
       rg_district := FIND_GROUP (rg_name);
       IF ID_NULL (rg_district)
       THEN
          rg_district :=
             CREATE_GROUP_FROM_QUERY (rg_name,
                                      'select dist,dist from district_mas'
          vtemp := POPULATE_GROUP (rg_district);
          POPULATE_LIST ('BLOCK3.DISTRICT', rg_name);
       END IF;
       END;
    */WHEN-LIST-CHANGED*/---Not working. Cannot populate the list based on the List
       DECLARE
       rg_branch   recordgroup;
       rg_name1     VARCHAR2 (1000) := 'branch';
       vtemp       NUMBER;
    BEGIN
       rg_branch := FIND_GROUP (rg_name1);
       IF NOT ID_NULL (rg_branch)
       THEN
          DELETE_GROUP (rg_name1);
          rg_branch :=
             CREATE_GROUP_FROM_QUERY
                ('rg_branch',
                    'SELECT branch FROM dist_branch WHERE district IN (SELECT DIST FROM DISTRICT_MAS WHERE DISTRICT ='
                 || :BLOCK3.DISTRICT
          vtemp := POPULATE_GROUP (rg_branch);
          POPULATE_LIST ('BLOCK3.BRANCH', rg_branch);
       END IF;
       END;
    Table:
    CREATE TABLE DISTRICT_MAS
      DIST  VARCHAR2(100 CHAR)
    CREATE TABLE DIST_BRANCH
      DISTRICT  VARCHAR2(100 CHAR),
      BRANCH    VARCHAR2(100 CHAR)
    Values:
    insert into district_mas values('chennai');
    insert into district_mas values('coimbatore');
    insert into dist_branch values('chennai','chennai_north');
    insert into dist_branch values('coimbatore','Podanur');
    Regards
    Shagar M

    Hmm, not tested.
    try this..
    --*/WHEN-LIST-CHANGED*/
       DECLARE
       rg_branch       recordgroup;
       rg_name1     VARCHAR2 (1000) := 'branch';
       vtemp        NUMBER;
       QT            VARCHAR2(10) :='''';
    BEGIN
       rg_branch := FIND_GROUP (rg_name1);
       IF NOT ID_NULL (rg_branch)
       THEN
          DELETE_GROUP (rg_name1);
          rg_branch :=
             CREATE_GROUP_FROM_QUERY
                ('rg_branch',
                    'SELECT branch FROM dist_branch WHERE district IN (SELECT DIST FROM DISTRICT_MAS WHERE DISTRICT ='
                 || QT||:BLOCK3.DISTRICT||QT||')'
          vtemp := POPULATE_GROUP (rg_branch);
          POPULATE_LIST ('BLOCK3.BRANCH', rg_branch);
       END IF;
    END;
    Hope this works..
    Hamid

  • Record display item/field

    How can I have a field displayed on a form as a list of records? That is e.g status_type as heading with list of all the data records shown on the form.
    Femi

    I did not make myself clear but what I wanted was to have a display-only field/item on a form with all it's values.
    Set the item type to display item and changed the setting for bevel to lowered.
    Thanks.

  • Display Item Link Based on Login

    I'd like to display an item based on the login name of the current user.
    Seems like that would be relatively easy but I'm running into snags.
    Any help appreciated.

    Make sure you enable in page options and access options for the region that you have enabled item level security and then select access and add the appropriate user.

Maybe you are looking for

  • How to use Webdispatcher as a load balancer?

    We have multiple java instances for an EP7. We want to use a webdispacher to do load balance. I saw one document before but cannot find it anymore. Please help. Points guaranteed. Thanks!

  • How should I Set Up My New External G-Raid?

    Just received my new GR42000 2TB G-Raid Drive, but before even turning on the unit I began to read the manual PDF that came with the drive. I want to use this unit with my new iMac and also with my HP PC which has video files that I'd like to access

  • How can I see seconds in browsing history

    I need to figure out how to see seconds in the timestamp in browsing history. e.g. "9:34:45AM"

  • HCM & forms Process using WD4A

    Hello All, We are planning to implement applications of HCM & forms Process using WD4A same like standard create Position u2026etc. to avoid Adobe forms. Could you please share your advises, suggestions and approach to be followed. Best feasible solu

  • GR Slip Check

    Hi My problem is that by default i want that check to come and if the user does not want that he can remove it manually. Please provide me with solution Thanks Ankit