Display Distinct values in LightSwitch browse screen

i have one browse screen which is fetching value from one entity(Attached to SQL datasource), the entity will look like the below snapshot.
ID
EMP ID
Emp Name
Age
Role
1
266
Srikanth
26
Developer
2
266
Srikanth
26
Architect
3
122
Raj
29
Tester
4
122
Raj
29
Manager
So in the browse screen its coming with all row values (1,2,3 and 4) even though i removed the Role field from the screen. I want to display only the distinct Emp ID, Name, Age in the browse screen of this entity. Please
give me some suggestion.

i suggest to Create new View Return Only Distinct record from Original Table And Update your DataSource with this view And Create Your Browse Screen Depends on This View
SQL Script
Create View VwEmployeeDistenct
 as 
select Distinct  [EMP ID], [Emp Name],
[Age]  from OrginalEmplyeeTable 
go

Similar Messages

  • Display Key Values only on filter screen

    Hello all,
    I have one specific requirement. When user runes any query (based on an infoset) , data is displayed. After which if user presses right clicks on data filed -> Select filter value. Then one  Filter screen is displayed. Values from this filter screen are displayed as text values.
    I want it to display as key value. This particular infoobject is in coumpounding.
    I have already tried changing Bex properties at infoobject level and RSD1, it does not have any effect.
    can anyone suggest any option.
    Edited by: priyanka s on Sep 15, 2008 10:41 AM

    Hi Priyanka,
    In BI 7.0, these options are available in the definition of InfoProvider itself.
    For DSO:
    Right Click on Key/Data Fields --> Provider Specific Properties of the InfoObject --> Display (Column)
    For Cube:
    Right click on Dimensions --> Provider Specific Properties of the InfoObject --> Display (Column)
    Set the required properties here and you will get the required results.
    Hope this time you get it right
    Regards,
    Yogesh

  • How to display array values in jsp of screen flows

    Hi,
    can u please help me .
    I am having one array variable i have stored all the values but i have to display that in JSP page .how to display
    Edited by: user12171025 on Nov 4, 2009 11:11 PM

    Hi,
    I think that its necessaries to use AJaX.
    I am implemeting something like that.
    I have a input text that works like a filter and depends on what my user types in input text I populate my table with some information.
    In order to do that, I put in my JSP a div with an Id and I used ajax, like that:
    function ajaxFunction()
              var xmlhttp;
              if (window.XMLHttpRequest)
              xmlhttp=new XMLHttpRequest();
              else if (window.ActiveXObject)
              // code for IE6, IE5
              xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
              else
              alert("Your browser does not support XMLHTTP!");
              xmlhttp.onreadystatechange=function()
                                                      if( xmlhttp.readyState==4 )
                                                           document.getElementById("tabelaResponsaveis").innerHTML = xmlhttp.responseText;
         var resp = "<f:invokeUrl var='solicitacao' methodName='getResponsaveis'/>";
         xmlhttp.open("POST",resp,true);
         xmlhttp.send(null);
    getResponsaveis is a method inside my BPM that returns a HTML code (the table HTML code with all the information that I need to show.
    I Hope to help
    Thanks Marcos

  • Display Distinct Values

    Hello Gurus,
    I have a table with 3 Cols No , Id , Name where ( No , ID ) is a compsite key and the data looks like this
    No , Id , Name
    1 2 A
    1 3 B
    1 4 C
    i want a SQL Query which displays data like this
    No Id Name
    1 2 A
    3 B
    4 C
    Help will be really appreciated
    Thanks in advance
    Ths

    Take a look at your results. Is that really how you want it?
    Or did you forget to use tags to preserve the spacing?
    Instructions here: http://forums.oracle.com/forums/help.jspa                                                                                                                                                                                                                                                                                                                                                                                           

  • Distinct values in each column

    Hi
    I have a table with three columns and I would like to display distinct values in each column. Could any one please help me to get the output.
    col1     col2     col3
    ====     ====     ====
    a     1     x     
    a     2     y
    a     3      z
    a     4      u
    b     5      v
    b     6      x
    b     7      x
    b     9      x
    b     10     y
    b     11     y
    b     12     y
    b     13     y
    b     14     x
    b     15     y
    b     16     z
    b     17     u
    b     18     v
    b     19     x
    b     20     x
    c     21     x
    c     22     y
    c     23     y
    c     24     y
    c     25     y
    c     26     x
    c     27     y
    c     28     z
    Output needed
    ===========
    col1     col2     col3
    ====     ====     ====
    a     1     x
    b     2     y
    c     3     z
         4     u
         5     v
         6
         7
         9
         10
         11
         12
         13
         14
         15
         16
         17
         18
         19
         20
         21
         22
         23
         24
         25
         26
         27
         28
    Thanks
    Vasanth

    but the only drawback - you need to know the column, comprising the biggest amount of distinct values beforehand.No. There is no any difference in which column will be chosen as "based".
    For demo purposes I've added extra row number column to show full generality and symmetry of the approach:
    exec dbms_random.seed(0)
    with t as ( select chr(ascii('a') + dbms_random.value(0, 3)) as c1,
                       trunc(dbms_random.value(1, 20))           as c2,
                       chr(ascii('u') + dbms_random.value(0, 6)) as c3
                  from dual connect by level <= 20
       tt1 as ( select lag(          null,  1, c1) over (partition by c1 order by null) as c1,
                       lag(to_number(null), 1, c2) over (partition by c2 order by null) as c2,
                       lag(          null,  1, c3) over (partition by c3 order by null) as c3
                  from t
       tt2 as ( select tt1.*,
                       row_number() over (order by c1) as rn1,
                       row_number() over (order by c2) as rn2,
                       row_number() over (order by c3) as rn3,
                       rownum rn
                  from tt1
       tt3 as ( select case when rn1 > rn
                            then last_value(c1) over (order by rn1 range between abs(rn1 - rn) preceding
                                                                             and abs(rn1 - rn) preceding)
                            else last_value(c1) over (order by rn1 range between abs(rn - rn1) following
                                                                             and abs(rn - rn1) following)
                       end as c1,
                       case when rn2 > rn
                            then last_value(c2) over (order by rn2 range between abs(rn2 - rn) preceding
                                                                             and abs(rn2 - rn) preceding)
                            else last_value(c2) over (order by rn2 range between abs(rn - rn2) following
                                                                             and abs(rn - rn2) following)
                       end as c2,
                       case when rn3 > rn
                            then last_value(c3) over (order by rn3 range between abs(rn3 - rn) preceding
                                                                             and abs(rn3 - rn) preceding)
                            else last_value(c3) over (order by rn3 range between abs(rn - rn3) following
                                                                             and abs(rn - rn3) following)
                       end as c3
                  from tt2
    select c1, c2, c3 from tt3
      where c1 || c2 || c3 is not null
      order by c1, c2, c3
    C1            C2 C3
    a              1 u
    b              3 v
    c              4 w
                   5 x
                   7 y
                   8 z
                   9
                  11
                  13
                  15
                  16
                  17
                  19
    13 rows selected.P.S. Thanks to [url http://www.sql.ru/forum/actualthread.aspx?bid=3&tid=482506&hl=over+range#4785373]Vladimir Sitnikov for the demo of the approach.

  • How to get distinct values from a list and display in a ListView webpart.

    Hi,
    I have a requirement in which I need to pull unique/distinct values from a custom list and then display it via a listview webpart. Can any one suggest how this can be done.
    If possible please share the CAMEL query to fetch distinct values from a custom list.
    Thanks,
    Ankit

    Hi Ankit,
    Is there any particular reason that the values need to be shown in a list view web part?  Are you going to use that web part for filtering via web part connections?
    I ask because the enterprise site collection features include the SharePoint List Filter web part, which may accomplish what you're looking for.
    If you just need to display the values in a grid view, you might have more luck with the JavaScript Client Object Model.  Try putting the following in a text file:
    <style>
    .CustomTableClass{display:table;table-layout:fixed}
    .CustomRowClass{display:table-row;}
    </style>
    <div id="distinct_values_div" class="CustomTableClass">
    <img src="/_layouts/loading.gif" />
    </div>
    <script language="JavaScript" type="text/JavaScript">
    var siteUrl = '/sitecollection/web'; //use the actual subsite URL here
    var listName = 'mylist'; // use the actual list name here
    var field = "Title" // use the actual field you want to display here
    var divToUpdate = document.getElementById("distinct_values_div");
    var rowClass = "CustomRowClass";
    ExecuteOrDelayUntilScriptLoaded(function(){
    var clientContext = new SP.ClientContext(siteUrl);
    var web = clientContext.get_web();
    var lists = web.get_lists();
    var list = lists.getByTitle(listName);
    var camlQuery = new SP.CamlQuery();
    camlQuery.set_viewXml('<View><Query></Query><RowLimit>500</RowLimit></View>');
    this.collListItem = list.getItems(camlQuery);
    clientContext.load(collListItem,"Include ("+field+")");
    clientContext.executeQueryAsync(
    Function.createDelegate(this, this.onQuerySucceeded),
    Function.createDelegate(this, this.onQueryFailed));
    },"sp.js");
    function onQueryFailed(sender, args){
    divToUpdate.innerHTML = 'Unable to retrieve values: '+args.get_message());
    function onQuerySucceeded(sender, args){
    var allValues = [];
    var listItemEnumerator = collListItem.getEnumerator();
    divToUpdate.innerHTML = "";
    while(listItemEnumerator.moveNext()){
    var listItem = listItemEnumerator.get_current();
    if(!containsString(allValues,listItem.get_item(field)){
    var value = listItem.get_item(field);
    allValues.push(value);
    var newDiv = document.createElement("div");
    newDiv.className = rowClass;
    newDiv.innerHTML = value;
    divToUpdate.appendChild(newDiv);
    function containsString(strArray, text){
    var contains = false;
    for (var i=0; i<strArray.length; i++){
    if(strArray[i]==text){contains = true; break;}
    return contains;
    </script>
    Upload the text file to a library on the site, then add a content editor web part to a page where you want the distinct values to appear. In the content editor web part's properties, edit the Content Link so that it links directly to the text file.  This
    will cause the JavaScript to run on the page.

  • I am trying to build a basic TCL skeleton script that reads a remote SNMP OID and displays the value on the screen.

    I am trying to build a basic TCL skeleton script that reads a remote SNMP OID and displays the value on the screen.
    I don't want it to be an EEM Event, I just want to run it from the (tcl)# prompt.
    So I guess I'm asking if you can use cli_exec and other commands in the "namespace import ::cisco::eem::*" in a normal non-EEM script - can I do that?
    This is the error I get:
    OTN.159(tcl)#source flash:TCL_SNMP_Remote_Read.tcl
    invalid command name "::cisco::eem::event_register_none"             ^
    % Invalid input detected at '^' marker.
    What am I missing?
    =================  TCL_SNMP_Remote_Read.tcl  ==============================
    ::cisco::eem::event_register_none
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    if [catch {cli_open} RESULT]
        { error $RESULT $errorInfo }
        else { array set cli1 $RESULT }
    if [catch {cli_exec $cli1(fd) "snmp get v2c 192.168.1.100 public timeout 1 oid 1.3.6.1.2.1.1.1.0" } RESULT]
           { error $RESULT $errorInfo  }
           else { set SnmpSysDesc $RESULT }
    if [catch {cli_close $cli1(fd) $cli1(tty_id)} RESULT] {
                error $RESULT $errorInfo
    puts $SnmpSysDesc
    =========================================================================
    In the sho-run config I have:
    event manager directory user policy "flash:/"
    event manager session cli username "cisco"
    Any help to get me started would be greatly appreciated!
    Tim

    If you don't want an EEM policy, then don't use any of the EEM constructs.  Instead, all you need is this:
    set output [exec "snmp get v2c 192.168.1.100 public timeout 1 oid 1.3.6.1.2.1.1.1.0"]puts $output

  • How to display the sort value in the selection screen in the report title

    Dear All,
    How to display the sort value in the selection screen in the report title? I have selected a value in the selection screen for sorting , but i need that values by which i have sorted with in the report title. Can you please throw some light on this!!
    Good day,
    Thanks and regards
    Arun S

    Hi Arun,
    Try this.
    1, Set one dynamic parameter,
    2, Drag and drop that parameter into  your report title.
    3, Pass the value(sort value) dynamically from your application,
    4, Cheers..
    Other wise Try with Dataset, create a dataset and fill thev alue into that.. Then  set the data source from CR designer. and darg and drop that data column into the report.
    Hope this will work,
    Regards,
    Salah
    Edited by: salahudheen muhammed on Mar 25, 2009 11:13 AM

  • How to display negative values in a screen field of a screen

    Hi All,
    Please let me know how to display negative values in a screen field of a screen.
    thanks

    Hi Kishore,
    You can do this method. In the screen , create a text field of CHAR instead fo creating an INT4 field.
    I have created a field of CHAR of name say TEXT.
    In the main program,
    declare a variable of the same name ie. TEXT.
    data: TEXT(5) TYPE C.
    In PBO, just assign the negative values.
    It will work.Since there is automatic conversion between character and integer data types, it will work for positive values as well.
    Regards,
    Sylendra.

  • I would like to have at least 1 of my toolbars displayed at the BOTTOM of my open browser screen.How do I move a toolbar from the top to the bottom of the page?

    I would like to have at least one of my toolbars displayed at the '''BOTTOM''' of my open browser screen. How do I move '''a''' toolbar from the top to the bottom of the page? I do NOT want to do this by using an extension, and when I read about the extension, I really did not see how it would move the toolbar from the top to the bottom any open browser page.
    Thank you in advance for supply the answer and procedure to get this accomplished.

    Try this extension to create extra toolbar at the bottom and drag items from other toolbars on it.
    *TotalToolbar: http://totaltoolbar.mozdev.org/
    ''(compatibility is at 13.0a1, so you may need to override the installation to check if the extensions works)''

  • How to display all distinct values without duplicates.

    Hi Pros,
          I want to present a values list in dashboard, but this list have much duplicates, so when dispalying, I want to display all distinct values without duplicates.

    Hi,
    You can avoid the duplicates from the source side or use a filtered row option in the component.
    Arun

  • Display Distinct Item Value

    Hello All,
    I am having an problem displaying a distinct value for Item 'PK_EMPL_ID'. I need all the Items below because I am passing these values to another page in APEX. But I need help with this select statement syntax.
    SELECT hs.pk_session_id,
           hsp.pk_session_process_id,
           hs.fk_class_id,
           hsm.pk_empl_id,
           hsm.last_name || ', ' || hsm.first_name studentname,
           dg.department_group_descr,
           pd.department_descr,
           hsm.fk_dept_group,
           hsm.fk_dept_code,
           hsp.fk_empl_id,
           hs.session_meridiem,
           hsn.session_name,
           hs.session_date,
           hsp.session_process_status
        FROM   hrt_session hs,
               hrt_session_name hsn,
               hrt_session_process hsp,
               hrt_student_master hsm,
               cobr.department_group dg,
               cobr.pps_department pd
        WHERE  hsn.pk_session_name_id = hs.fk_session_name_id
           AND hsp.fk_session_id = hs.pk_session_id
           AND hsp.fk_empl_id = hsm.pk_empl_id
           AND hsm.fk_dept_group = dg.pk_department_group_id
           AND hsm.fk_dept_code = pd.pk_department_idMy output is like:
    -PK_EMPL_ID-
    JOHN
    JOHN
    JOHN
    BOBBY
    JAMES
    I only want to display each 'PK_EMPL_ID' value once when the select statement is executed, not duplicate values. I have tried distinct, group by etc... but I am having trouble since I am using multiple tables using these foreign keys. I have viewed a few threads but they are only handling one or two item values from one table. Can anyone assist me with please? Thanks ahead of time.

    Hi,
    Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements) for all tables, and the results uyou want from that data.
    You may have a clear idea of where you're coming from, and where you want to go, but the description alone doesn't convey that clear idea to us.
    You can also rephrase your question in terms of some commonly available table, like scott.emp.
    For example: "I'm doing this query on scott.emp:
    {code}
    SELECT      job
    ,     deptno
    FROM     scott.emp
    {code}
    How can I get only 1 row per distinct job?"
    Without sample output, the question is still vague.
    There are 14 rows in scott.emp.
    You can reduce the output to 9 rows by changing "SELECT" to "SELECT *DISTINCT* ":
    SELECT DISTINCT
         job
    ,     deptno
    FROM     scott.emp
    ;which produces:
    OB           DEPTNO
    MANAGER           20
    PRESIDENT         10
    CLERK             10
    SALESMAN          30
    ANALYST           20
    MANAGER           30
    MANAGER           10
    CLERK             30
    CLERK             20But that's as far as you can go without changing the results.
    For example, all three departments have MANAGERs. If you want only 5 rows of outptu (one for each of the 5 distinct jobs), then which deptno do you want?
    If you want the lowest one, here's one way to do that:
    WITH     got_rnum     AS
         SELECT     job
         ,     deptno
         ,     ROW_NUMBER () OVER ( PARTITION BY  job
                                   ORDER BY          deptno
                           ) AS rnum
         FROM    scott.emp
    SELECT     job
    ,     deptno
    FROM     got_rnum
    WHERE     rnum     = 1
    ;Output:
    JOB           DEPTNO
    ANALYST           20
    CLERK             10
    MANAGER           10
    PRESIDENT         10
    SALESMAN          30There are other apprioaches to this problem, too. The advantage of this one is that it works well with any number of columns in the output.

  • Display a value from PLSQL code to screen

    How to display a value from PLSQL code to screen without loading or refreshing the page?
    im using ajax to call the javascript to run the PLSQL code. i desire to view some value in the screen when i run the PLSQL code
    skud.

    anything that you print from the PLSQL code(using htp.p, htp.prn etc) with will available in Javascript as the server response. You can parse that string it in javascript and display it on screen or modify page items or create dynamic items/elements using those values.
    A minimal example
    Ondemand PLSQL process : TEST_PROCESS
    begin
      htp.prn('hello world');
    end;Javascript Code
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=TEST_PROCESS',0);
    ajaxResult = ajaxRequest.get();
    alert(ajaxResult);Will display an alert message "hello world"
    You can construct the string in JSON/XML format in PLSQL to pass complex data structures(or multiple values) or even HTML code, then do the required processing in Javascript, for example extract out item values from it and set items, convert the JSON array to a select list item in the page or put the HTML code with a div element in the page.

  • How to add a column to a list created with the Dynamic List Wizard to display the values of the fiel

    Hi,
    ADDT, Vista, WAMP5.0
    We have 2 tables: clients_cli (id_cli, name_cli, tel_cli, and several more fields) and cases_cas (id_cas, idcli_cas, court_cas, and a lot of other fields).
    Clients may have many cases, so table cases_cas have a foreign key named idcli_cas, just to determine which case belongs to which client.
    We designed the lists of the two tables with the Dynamic List Wizard and the corresponding forms with Dynamic Form Wizard.
    These two forms are linked with the Convert Dynamic List and Form Wizards, which added a button to clients list named "add case".
    We add a client and then the system returns to the clients list displaying all clients, we look for the new client just added and then press "add case", which opens the Dynamic Form for cases, enter all case details and everything processes ok.
    However, when we view the cases list it display all the details of the case, including the column and values for the foreign key idcli_cas. As you can image, it is quite difficult for a human to remember the clients ids.
    So, in the cases list we added a another column, named it Name, to display the names of the clients along with cases details. We also created another recordset rsCli, selected the clients_cli table, displaying all columns, set filter id_cli = Form Variable = idcli_cas then press the Test button and everything displays perfect. Press ok.
    Then, we position the cursor inside the corresponding cell of the new Name column, go to Bindings, click on name_cli and then click on insert. The dynamic field is inserted into the table cell as expected, Save the page, and test in browser.
    The browser call the cases list but fails to display the values of the Name column. The Name column is simply empty.
    This issue creates a huge problem that makes our application too difficult to use.
    What are we doing wrong?
    Please help.
    Charles

    1.     Start transaction PM01, Create Infotype, by entering the transaction code.
    You access the Create Infotype screen.
    2.     Choose List Screen.
    3.     In the Infotype no. field, enter the four-digit number of the infotype you want to create.
    When you specify the infotype number, please remember to enter any leading zeros.
    4.     In the Screen Number field, enter the screen number of the list screen you want to enhance.
    5.     Choose Create.
    The Dictionary: Initial screen appears:
    6.     Create the list screen structure.
    7.     Choose Activate.
    8.     Return to the Enhance List Screen in the Enhance Infotypes transaction (PM01).
    9.     Choose Create All.
    The additional fields are displayed on the list screen, however, they contain no data.
    The fields can be filled in the FORM routine FILL-LISTSTRUCT in the generated program ZPnnnn00. The FORM routine is called for each data record in the list.
    Structure ZPLIS is identified when it is generated with a TABLES statement in the program ZPnnnn00.
    The fields can be filled from the Pnnnn structure or by reading text tables.

  • F4 display upon value request - values to be selected

    Hello experts,
    I have an issue here. When the function module F4IF_INT_TABLE_VALUE_REQUEST is used in my program for displaying the PSTYV field values on the selection screen upon value request. Now, when the popup opens there are 53 number of item categories, i.e., from VBRP table. If any one of them is selected and double clicked, they should be selected as per the conventional idea, but nothing is being selected after double clicking. How to achieve this ?  The following is my code.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SO_PSTYV-LOW.
    SELECT DISTINCT PSTYV
      FROM VBRP
      INTO TABLE GT_PSTYV.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
        retfield               = 'PSTYV'
       VALUE_ORG              = 'S'
      tables
        value_tab              = GT_PSTYV
       RETURN_TAB             = GT_RETURN
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks and regards,
    Ambareesh J.

    Try passing parameters dynpprog dynppr and dynprofield as below:
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
         EXPORTING
           retfield        = 'PSTYV'
           value_org       = 'S'
          dynpprog        = sy-cprog
           dynpnr          = sy-dynnr
           dynprofield     = 'SO_PSTYV-LOW'
         TABLES
           value_tab       = gt_pstyv
           return_tab      = gt_return
         EXCEPTIONS
           parameter_error = 1
           no_values_found = 2
           OTHERS          = 3.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    Regards

Maybe you are looking for

  • DVD Drive won't recognize DVD's or CD's

    I just got a new, refurbished Mac Mini today. The DVD Drive will recognize only 1 out of the 3 install disks that came with the system. It tries to initialize 2 out of the 3 and just ejects them about 15 seconds after I put them in. I tried to put a

  • Wont let me into itunes store due to network settings, please help!

    I previously had no problems with the store and have regularly purchased from it. Since going wireless I can no longer get in and now when I try through modem it doesn't work either. I have flushed the DNS settings as advised, but, no joy. If anyone

  • Converting swing components into some readable format

    Hello all, A requirement for the application I'm writing is for it to email automatically generated reports to various clients. My problem is that I'm not sure what would be the best format to send the reports. The reports are attached to the email a

  • Swf-Ressourcen in pdf-Datei (Acrobat X Pro und InDesign CS5)

    Hallo, ich erstelle momentan ein interaktives Vorlesungsskript für ein Seminar an der Uni mit InDesign CS5 und Acrobat X Pro, das über eine Lernplattform verteilt werden soll. Ein Element des Skripts soll eine interaktive Hertz-Skala sein. Dabei soll

  • HT4906 Getting Photos back from iCloud to MacBook Pro

    I can see my photos in My Photo Stream using my iPad,now I need them back to my newly formatted MacBook Pro. How do i do that? Photo Stream Settings is disabled in MacBook Pro.