cancel
Showing results for 
Search instead for 
Did you mean: 

Nakisa OrgChart 3.0sp3(Live RFC)Position ID field in Standard view(Position hierarchy) from OrgPositionStructure

Former Member
0 Kudos

Hi,

If i go to OrgChart standard view I cannot see Position ID(only i can see name of the position and name of the person) in the box(node).

But position ID already exists,if i go to OrgChart-OrgStructure-Position hierarchy-views-pos_standard-Position holder ID(template field name)-Position ID(data element field)

But still i cant see Position ID.

Regards,

Xavier.

Accepted Solutions (1)

Accepted Solutions (1)

StephenBurr
Active Contributor
0 Kudos

Xavier,

Position ID is shown in AdminConsole field mappings for all views and available in the view template but not shown to the end user.  This is the standard behaviour.  The position ID is needed in the template so it can be used for other functionality (to pass to the details panel when you click on the box for example).

The logic of the view (contained in the XSL generated from the template) can be altered to show the field if you want to see it. For example, I have done it before to put the ID in brackets after the Position title.

Hope that helps,

Stephen

Former Member
0 Kudos

Stephen,

So I can show Position ID only through customization.

Is it possible to configure through Admin Console.

It shows the Position name as Nakisa trainee,also i should see Position ID below that in the same box(node).

Thanks,

Xavier.

lukemarson
Active Contributor
0 Kudos

Hi Xavier,

You have to add this field through customization. You just need to add the field to the view template XSL file in the field variables section and then edit the flex-display and html-display templates to display the field.

Best regards,

Luke

StephenBurr
Active Contributor
0 Kudos

Xavier,

Also, since the field isn't in the detaildata linked to this, you will need to add it to that too (for SAP_Live_RFC this is "pos_standard_TopLevelDetailf532615d8a9a44f.xml").

Note: It is in the data element, so no work required there.

Field is called POSITION_ID (name and alias).

So add field POSITION_ID to the fieldset "All" in the detaildata, then change the view XSL.  You could add a variable at the top of the view XSL, as Luke suggested, like this:

<xsl:variable name="PositionID" select="/cds/sections/section[@name='pos_standard_TopLevelDetailf532615d8a9a44f']/detail[@name='pos_standard_TopLevelDetailf532615d8a9a44f']/record/field[@name='POSITION_ID]"/>

and then amend the various templates so it appears in the correct place on Flex/HTML and when printed ...

OR if you wanted it to appear after the name field then you could append Position ID value to the end of the existing variable "Position" using XSLT and it would appear there (you could append with brackets either side).  This saves you having to alter any other part of the XSL view template.

Stephen

Former Member
0 Kudos

Thanks stephen, I will do it.

Former Member
0 Kudos

Thanks Luke, I will add the field through customization.

Former Member
0 Kudos

Hi Stephen/Luke,

I added the field as specified-----Also, since the field isn't in the detaildata linked to this, you will need to add it to that too (for SAP_Live_RFC this is "pos_standard_TopLevelDetailf532615d8a9a44f.xml").

Also added-So add field POSITION_ID to the fieldset "All" in the detaildata, then change the view XSL.  

<xsl:variable name="PositionID" select="/cds/sections/section[@name='pos_standard_TopLevelDetailf532615d8a9a44f']/detail[@name='pos_standard_TopLevelDetailf532615d8a9a44f']/record/field[@name='POSITION_ID]"/>

Now i can see the field Position ID (both in template field name and data element field) in Admin Console:OrgChart-OrgStructure Position hierarchy-Views-Standard view.

But still i cannot see the Position ID in the OrgChart OrgStructurePosition hierarchy (box)node view.

Regards,

Xavier.

lukemarson
Active Contributor
0 Kudos

Hi Xavier,

Once you've assigned it as a variable you then need to add the field for display in the html-display and flex-display templates within your XSL template file. If you look for the other variables you can see what code is used to visualize those fields (in HTML or FleXML).

Best regards,

Luke

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi guys,

I'm facing the exact same issue.

The only problem is that I can't seem to find the files where I should add the code.

Could anbody be more precise on the location of the file, which file and where in the code to add this?

Thanks a lot in advance!

Kr,

Gerrit

StephenBurr
Active Contributor
0 Kudos

I suggest opening a new thread. Reference this one and include your own system details as per posting guidelines.

Former Member
0 Kudos

Hi Stephen,

Now I need to add the Position ID next to the Position Name in brackets(OrgChart Position Node-Standard View)

.As suggested by you i tried to add but it is not reflecting.

This we are doing in OrgChart3.0sp3-SAP_LIVE_2.

  • In Data Element Configuration,Added POSITION_ID (field name and caption key) in SAPOrgUnitOrgChartTypeSHierarchyDataElement
  • In Detailed Data Configuration, added POSITION_ID in SAPOrgUnitOrgChartTypeSBasicViewDetailData65fc41ff28964be
  • In Templates Generated,pos_standard65fc41ff28964be-appended the POSITION_ID to the variable Position.

Can you please tell how to append POSITION_ID in XSL from TemlatesGenerated.I feel the issue is in appending also i checked with XSLT Editor.

Regards,

Xavier.

StephenBurr
Active Contributor
0 Kudos

Xavier,

For Live_2 build it is a little different. Your Question does have "Live RFC" in the title!

Let me try again …

The data element  (“SAPOrgUnitOrgChartTypeSHierarchyDataElement”) already has position id retrieved in it (Object_ID).

Therefore you only need to change the view XSL to take advantage of it.

Add a line

<xsl:variable name="PositionID" select="/cds/sections/section[@name='SAPOrgUnitOrgChartTypeSBasicViewDetails65fc41ff28964be']/detail[@name='SAPOrgUnitOrgChartTypeSBasicViewDetails65fc41ff28964be']/record/field[@name='Object_ID']"/>

Then amend the XSL file to use this new variable wherever you want to output it.

Stephen

Former Member
0 Kudos

Thanks Stephen, Finally did it.

lukemarson
Active Contributor
0 Kudos

Hi Xavier,

I assume that you're referring to the Standard view for Positions? I don't believe that Position ID is displayed in the Standard view for Positions.

Best regards,

Luke