Displaying multiple roles related to a single key value in a single view MVC 4

Dear Team,
         My name is Ajay Sutar. I am newly learning MVC 4, as we are about to initiate a new project in ASP .NET MVC 4. I am using a details scaffolding to display a  single
record. but now my single employee have multiple roles. As example,
 Emp_no    |    Role                     | Salary 
 E1             | Software Engineer  | 10000
 E1             | Tester                     | 10000 
as i have used Details scaffold and FirstOrDefault method of linq for this view, I am unable to display the second role "Tester" in the  output. only first role is geeting displayed.
What i want is :
Emp_no : E1                 Role: Software Engineer                  Salary:10000
                                              Tester 

Hello,
Welcome to MSDN forum.
I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
and Visual Studio Editor.
Because you are working with ASP.NET Web Application, I suggest that you can consult your issue on ASP.NET forum:
http://forums.asp.net/
 for better solution and support.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Display multiple roles like in BEX browser onto the Portal

    Hi All,
    What is the best way to display BW roles onto the Portal.
    Thanks,
    Tom

    Hi Patricio,
    In the backend BW system, there are BW roles assigned for each user. When I go to the BEX browser, I see these BW roles that contains queries and workbooks. Now how do I display these BW roles onto the portal.
    Thanks,
    Tom

  • Display values of a single field in a multiple rows in a table region

    Hi Tech-Gurus,
    I want to display values of a single field ( which is in a table region) in multiple rows and also need to restrict the values from decimal number. If i click save, then it will throw exception "Decimal not allowed".
    xxxxxx
    yyyyyy
    Reg.No
    1234
    5678
    7654
    I need to display the values of REG.NO in different rows like,
    1234
    5678
    7654
    and also need to validate as well against Decimal values.
    Please help me with the code how i will iterate ?

    Hi,
    I am assuming you are talking about displaying substrings from the Reg No in different rows. For this you would need to write a query which identifies the substrings and creates a separate row for each (ensure you choose values for all other columns in the table row). Kindly let me know if the understanding is incorrect.
    To validate against decimal value you can use the java code by checking the difference of the number and the number on which modulus has been applied. Hope that helps.
    Regards
    Sumit

  • How to display multiple lines of texts in a single rows in ALV

    Hi,
    I have a unique requirement in which i have to display multiple lines if texts for a single rows in ALV Grid. Right now in my output it is coming in single line which is not visible fully because that text is more than 255 character. So i want to display the test by splitting into multiple lines and show it on output. Please suggest some solution for this if this is possible in ALV.
    Thanks,
    Raghav

    Hi Raghavendra,
    Its not possible to display multiple line in one row of an alv, but i think you can acheive it by splitting the whole text into multiple sub-text.
    For example, if your requirement is as below:
    Field #1          Field #2
    1                    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(200 characters)
    2                    yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy(220 character)
    then you can break Field#2 value into say 50 character and then populate the internal table with repetative entries of Field#1 and the finally sort it by Field#1 value... as a result of which you output will be somewhat as below:
    Field#1          Field#2
    1                   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                         xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                         xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                         xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    2                   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
                         yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
                         yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
                         yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
                         yyyyyyyyyyyyyyyyyyyy           
    Hope it will help you in meeting your requirement.
    Regards,
    Shradha

  • Combine multiple key figures in single key figure

    Hi,
    We have a requirement where we need to put multiple key figures into a single key figure
    For example source DSO is as follows (+ Unit object):
    Region    |   Date           |    Amount  |    Quantity
    Asia        |  01-01-2008  |    100        |    1000
    Eurpoe    |  02-02-2008  |     200       |     2000
    In Target DSO / Cube, the data must appear like this (no Unit Object)
    Region    |   Date            |  Type        |    Value
    Asia       |   01-01-2008   |   Amount   |    100
    Asia       |   01-01-2008   |   Quantity  |    1000
    Eurpoe   |   02-02-2008   |   Amount   |     200
    Eurpoe   |   02-02-2008   |   Quantity  |     2000
    How do we achieve this?
    Regards,
    Nikhil

    Hi
    Write a strart routine that maps Type ->Amount and Quantity,Value -> Kf of Amount or Quantity
    Put these chars into Key fields in target DSO = Region | Date | Type ,that will assure unique entries
    Bye

  • S_TABU_LIN from multiple roles to single user

    Hi everybody
    There is such situation:
    We are restricting the values of infoobject using S_TABU_LIN
    Everything is working fine if the user has authorization assigned only
    by one role.
    If the user has more then one role assigned then user has only values
    authorized that are included in the first role. All authorizations from
    other roles are not available
    For example:
    We have authorizations in 3 roles
    Role1
    Activity 03 ACTVT
    Organization criterion for key /BIC/ZMINISTRY ORG_CRIT
    Org. crit. attribute 1 * ORG_FIELD1
    Org. crit. attribute 2 04 ORG_FIELD2
    Org. crit. attribute 3 * ORG_FIELD3
    Org. crit. attribute 4 * ORG_FIELD4
    Org. crit. attribute 5 * ORG_FIELD5
    Org. crit. attribute 6 * ORG_FIELD6
    Org. crit. attribute 7 * ORG_FIELD7
    Org. crit. attribute 8 * ORG_FIELD8
    Role2
    Activity 03 ACTVT
    Organization criterion for key /BIC/ZMINISTRY ORG_CRIT
    Org. crit. attribute 1 * ORG_FIELD1
    Org. crit. attribute 2 06 ORG_FIELD2
    Org. crit. attribute 3 * ORG_FIELD3
    Org. crit. attribute 4 * ORG_FIELD4
    Org. crit. attribute 5 * ORG_FIELD5
    Org. crit. attribute 6 * ORG_FIELD6
    Org. crit. attribute 7 * ORG_FIELD7
    Org. crit. attribute 8 * ORG_FIELD8
    Role3
    Activity 03 ACTVT
    Organization criterion for key /BIC/ZMINISTRY ORG_CRIT
    Org. crit. attribute 1 * ORG_FIELD1
    Org. crit. attribute 2 08 ORG_FIELD2
    Org. crit. attribute 3 * ORG_FIELD3
    Org. crit. attribute 4 * ORG_FIELD4
    Org. crit. attribute 5 * ORG_FIELD5
    Org. crit. attribute 6 * ORG_FIELD6
    Org. crit. attribute 7 * ORG_FIELD7
    Org. crit. attribute 8 * ORG_FIELD8
    All of the roles are assigned to single user
    The problem is that user can get only that values from /BIC/ZMINISTRY
    that are authorized in role1
    Values authorized in role2 and role3 are not available.
    What could be a problem???

    Are you using BI7 as authorization?
    please check the link below regarding combining authorizations for BI7
    http://help.sap.com/saphelp_nw04s/helpdata/en/46/98cd87f37d19ace10000000a11466f/content.htm

  • Displaying multiple dynamic html pages within a single Portal folder.

    Hi all,
    Question: How can I display multiple dynamic html pages that are linked to each other, within a single portal folder?
    History:
    I have a designer/web server application (PL/SQL packakges) on Oracle
    8.1.7. Early in the development process we built it into WebDB2.2 and
    used folders on the left side as a navigation bar and the contents of my packages on the right side. This was easy, WebDB used Frames.
    Unfortunatley I could never automatically display a PL/SQL item in the folder area.
    Now I need to integrate the application into Portal 3.0 not the early adopters version, the one with 9iAS (NT for now, Unix later). I have a page/content area divided into regions and a navigation portlet on the left side containing links to PL/SQL folders whose contents are displayed on the right side. On the right side I have (for example) a Queryview. When I click on any of the buttons (i.e. Find, New), I land in a new page outside of my portal folder. This page contains a dynamically built list (from one or more DB Tables) and of course the first column contains a list of links that bring you to the individual item. How do I set my links or configure my folder to display
    within the portal folder area?

    Hi,
    One alternate is, increase the size of your screen, for this go to the layout of your screen and increase it as much you want, and also the custom container size, so that no scroll bar will appear at least.
    Other solution would be, as you said ALVs will be dynamical, it will be good to create buttons, or links on the screen based on the no of ALVs dynamically and on click of corresponding button call the corresponding ALV.
    But i dont think this will serve, first check the first option.
    Hope this helps u.,
    Thanks & Regards,
    Kiran.

  • Popup List with multiple columns but returning a single column (key value)

    Hi,
    1. Is it not possible to show a POPup (returning a key value) or Select list with more than 1 column? If so how?
    2. I have an item in a page which should be hidden if 1 particular button was pressed. This is is to use the same page but have some behavioural change based on which button (option) was selected. How can I get the name of the BUTTON PRESSED TO INVOKE THIS PAGE.
    thanks
    SebJos

    Hi,
    In that case, you should make the page item conditional. There are many techniques to do this but it would depend on what the button is for.
    As a simple example...
    1 - Create a hidden item on your page called, say, Pn_SHOW (replace n with your page number - eg, P1_SHOW). Set the default value of this item to either 0 (zero) or 1 - 0 will hide the item and 1 will display it, so in your example, set it to 0
    2 - On the page item you want to show/hide - on its definition, you have a Conditions section. Set the following:
    Condition Type: Value of Item in Expression 1 = Expression 2
    Expression 1: P1_SHOW
    Expression 2: 1
    When the page is loaded, because the value of P1_SHOW is 0, and due to the conditions we have just set (where P1_SHOW must be 1 for the item to be shown), the item will not appear on the page.
    When you created your button, a new page branch should have been created. On this branch, you have two settings - "Set these items" and "With these values". Set the following:
    Set these items: P1_SHOW
    With these values: 0
    You should also have at least one other branch on your page - one of these will need to set the value of P1_SHOW to 1 to get the item to display.
    Andy

  • Displaying multiple asian key sets?

    Hi all,
    Just wondering is there anyway to display multiple asian keysets in a java application?
    Right now I can set the locale to say Chinese with the command line property:
    -Duser.language=zh
    I could do the same with Japanese or Korean. But I was wondering is there anyway to display all these character sets in the same program? Would I have to set the JTextFields individually to the relevant fonts so i can see the characters? E.g. if the user wants to input Chinese, all JTextFields are set to Simsun. Same for other character sets?
    thanks,
    J

    1) Provide a font that has all such character sets (Korean, Japanese, Traditional Chinese and Simplified Chinese) -
    2) Recognize the different ranges, and display the text of different languages with different fonts - for instance, using Gulim for Korean, MingLiu for Chinese, Mincho for Japanese - not an easy task. (For instance, the Kanji - chinese characters used in Japanese, and Hanja - chinese characters used in Korean, could be depicted using the MingLiu font, but there's some characters from Kanji and Hanja that are missing in MingLiu). Such recognizing is done by some modern browsers, like IE and Mozilla. (You can write a 3-language page using UTF-8 encoding and all the characters will be correctly shown)

  • Displaying Multiple Values on GUI components - best way to implement

    Hi,
    my program needs to implement a basic function that most commercial programs use very widely: If the program requires that a GUI component (say a JTextField) needs to display multiple values it either goes <blank> or say something more meaningfull like "multiple values". What is the best way of implementing it?
    In particular:
    My data is a class called "Student" that among other things has a field for the student name, like: protected String name; and the usual accessor methods (getName, setName) for it.
    Assuming that the above data (i.e. Student objects) is stored in a ListModel and the user can select multiple "Students", if a JTextField is required to display the user selection (blank for multiple selections, or the student "name" for a single selection), what is the best (OO) way of implementing it? Is there any design pattern (best practice) for this basic piece of functionality? A crude way is to have the JTextField check and compare all the time the user selections one by one, but I'm sure there must be a more OO/better approach.
    Any ideas much appreciated.
    Kyri.

    Ok, I will focus on building a solution on 12c.
    right now I have used a USER_DATASTORE with a procedure to glue all the field together in one document.
    This works fine for the search.
    I have created a dummy table on which the index is created and also has an extra field which contains the key related to all the tables.
    So, I have the following tables:
    dummy_search
    contracts
    contract_ref
    person_data
    nac_data
    and some other tables...
    the current design is:
    the index is on dummy_search.
    When we update contracts table a trigger will update dummy_search.
    same configuration for the other tables.
    Now we see locking issues when having a lot of updates on these tables as the same time.
    What is you advice for this situation?
    Thanks,
    Edward

  • Hi can u please help me out to display multiple [b]thumbnail images[/b]

    hi,
    hi,
    please help me out!
    please help me out!!
    I need to display multiple thumbnail images on the jframe or on a jpanel . From the database where the path of the images are stored
    say i should first get thumbnail of the images and then display
    any one can please give me the code
    Thanx and Regards

    What is the context you're asking these questions in? Are these interview questions? Homework questions? Or is there some underlying business problem you're trying to solve?
    user644700 wrote:
    Create Query to restrict the user to a single row.                     I don't understand the question. You may be trying to create a VPD policy for the table, but that is far from clear from the question.
    Query to get the first inserted record FROM a table.                Probably not possible in general. Oracle doesn't track the date at which a row was inserted.
    Concatenate a column value with multiple rows.                          Again, I don't understand the question.
    Query to delete all the tables at once.                You'd need dynamic SQL. And a definition of "all tables"-- are you talking about all tables in a particular schema? All the tables in multiple schemas? Something else? Does "at once" imply that you want things to run in parallel? And does "delete" really mean delete (a DML operation)? truncate (a DDL operation)? or drop?
    SQL Query for getting Orphan Records.You'd need a definition of "orphan record" and requirements for what the parent and child tables are. The normal approach to finding parent and child tables dynamically would leverage foreign key constraints, but that would generally preclude the presence of orphan records.
    Justin

  • S_TABU_LIN in multiple roles

    Hi everybody
    There is such situation:
    We are restricting the values of infoobject using S_TABU_LIN
    Everything is working fine if the user has authorization assigned only
    by one role.
    If the user has more then one role assigned then user has only values
    authorized that are included in the first role. All authorizations from
    other roles are not available
    For example:
    We have authorizations in 3 roles
    Role1
    Activity 03 ACTVT
    Organization criterion for key /BIC/ZMINISTRY ORG_CRIT
    Org. crit. attribute 1 * ORG_FIELD1
    Org. crit. attribute 2 04 ORG_FIELD2
    Org. crit. attribute 3 * ORG_FIELD3
    Org. crit. attribute 4 * ORG_FIELD4
    Org. crit. attribute 5 * ORG_FIELD5
    Org. crit. attribute 6 * ORG_FIELD6
    Org. crit. attribute 7 * ORG_FIELD7
    Org. crit. attribute 8 * ORG_FIELD8
    Role2
    Activity 03 ACTVT
    Organization criterion for key /BIC/ZMINISTRY ORG_CRIT
    Org. crit. attribute 1 * ORG_FIELD1
    Org. crit. attribute 2 06 ORG_FIELD2
    Org. crit. attribute 3 * ORG_FIELD3
    Org. crit. attribute 4 * ORG_FIELD4
    Org. crit. attribute 5 * ORG_FIELD5
    Org. crit. attribute 6 * ORG_FIELD6
    Org. crit. attribute 7 * ORG_FIELD7
    Org. crit. attribute 8 * ORG_FIELD8
    Role3
    Activity 03 ACTVT
    Organization criterion for key /BIC/ZMINISTRY ORG_CRIT
    Org. crit. attribute 1 * ORG_FIELD1
    Org. crit. attribute 2 08 ORG_FIELD2
    Org. crit. attribute 3 * ORG_FIELD3
    Org. crit. attribute 4 * ORG_FIELD4
    Org. crit. attribute 5 * ORG_FIELD5
    Org. crit. attribute 6 * ORG_FIELD6
    Org. crit. attribute 7 * ORG_FIELD7
    Org. crit. attribute 8 * ORG_FIELD8
    All of the roles are assigned to single user
    The problem is that user can get only that values from /BIC/ZMINISTRY
    that are authorized in role1
    Values authorized in role2 and role3 are not available.
    What could be a problem???

    Hi. I do not need a composite role. There are created about 70 single roles. One for each business division. If the user have assigned only one role (works with one divison), everyhing is fine. But if the user have to work with several divisions, there is a need to assign multiple roles. The responsibilities for the each user change all the time so the roles that are assigned to him change too.

  • SPRO Display only role

    Hello Gurus,
    I wanted to create SPRO display role and i am not sure what tcodes SPRO calls in the background. I googled and find out that giving S_TCODE = * and making other auth obj's like S_PROJECT and S_PROJECTS (related to SPRO) to display only (03) will serve my purpose of creating SPRO display only role.
    My question is, if i give S_TCODE = * , i am giving access to all the tcodes in SAP which i don't want to. Is there a solution for this? (SPRO display only access with tcodes that SPRO calls in the background)
    Any suggestion, advice, comments are appreciated
    Thanks Gurus
    Venkat

    Hi Venkat,
    Yes you right. S_TCODE '*' is a hightened access to give.
    I am not sure if there is an easier way to do this. You could get the list of Tcodes within SPRO in a slightly long procedure:
    Steps:
    1. Activate the IMG activity display using the Path Additional Information>Additional Information>Display Key> IMG Activity.
    2. Use the Table CUS_IMGACH to find the Tcodes associated for each of the IMG Activity
    3. You could try assigning only these values under S_TCODE.
    Also I am not sure it works. But if you don't find an easier way out, this could be worth a try.
    Regards,
    Ann

  • Multiple values in a single cell in report !!

    Hello,
    I want to display multiple values in a single cell, each value separated by comma.
    Ex: I have Employee and Department.
    If a employee works for many departments, all the Department names should be displayed in the same cell in the report.
    Please help !

    Thanks for your replies !
    Is there any other way to achieve this ?
    There is 1 InfoObject which has 2 fields Employee and Department.
    Employee     Department
    001                A
    001                B
    001                C
    In the report there should be 1 row for Employee 001 with all the Departments displayed in the same cell separated by commas.
    Can this be done in the backend through a ABAP code?

  • How to Display multiple records in Table in VC without using BAPI.

    Hi All,
    I am working on Visual composer (NW2004s SP10). I am trying to display Poitems from BAPI_PO_GETDETAIL. I am creating my front end using VC. I have created one form and one Table where I want to display POItems. I am writing my logic of retrieving data from BAPI in CAF.I am connecting them in Guided procedures.When I run my process in Guided Procedures I am getting single row displayed in table. Can Anyone help me how to display multiple rows in table.
    Regards,
    Sheetal

    Hi Sheetal,
    if the BAPI returns a table, then you get multiple rows. From which system is the BAPI, so that I can check the BAPI to give you further information.
    Best Regards,
    marcel

Maybe you are looking for