Skip to main content
edited body
Source Link
Emaborsa
  • 1.2k
  • 1
  • 11
  • 35

I switched from InfoPath to the Designer forms. In the list iI have a Lookupfield that Points to another list. In the Control modes Edit and New the select boxes are created automatically using the usual elements

<SharePoint:FormField runat="server" id="ff6{$Pos}" ControlMode="Edit" FieldName="Betrieb" __designer:bind="{ddwrt:DataBind('i',concat('ff6',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Betrieb')}"/>
<SharePoint:FieldDescription runat="server" id="ff6description{$Pos}" FieldName="Betrieb" ControlMode="Edit"/>

The Problem arises in the ViewForm, where iI usually use the following:

<xsl:value-of select="@Betrieb"/>

But since Betrieb is a Lookup field, it creates an a element and in the form i see:

<a href="http://portal/projects/buchungsportal/_layouts/15/listform.aspx?PageType=4&ListId={f1b5206b-3d88-4ea3-8aba-6c26b9dd07f8}&ID=1146&RootFolder=*">THE VALUE I WANT TO DIAPLAY</a>

howHow do iI extract only THE VALUE I WANT TO DISPLAY?

I switched from InfoPath to the Designer forms. In the list i have a Lookupfield that Points to another list. In the Control modes Edit and New the select boxes are created automatically using the usual elements

<SharePoint:FormField runat="server" id="ff6{$Pos}" ControlMode="Edit" FieldName="Betrieb" __designer:bind="{ddwrt:DataBind('i',concat('ff6',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Betrieb')}"/>
<SharePoint:FieldDescription runat="server" id="ff6description{$Pos}" FieldName="Betrieb" ControlMode="Edit"/>

The Problem arises in the ViewForm, where i usually use the following:

<xsl:value-of select="@Betrieb"/>

But since Betrieb is a Lookup field, it creates an a element and in the form i see:

<a href="http://portal/projects/buchungsportal/_layouts/15/listform.aspx?PageType=4&ListId={f1b5206b-3d88-4ea3-8aba-6c26b9dd07f8}&ID=1146&RootFolder=*">THE VALUE I WANT TO DIAPLAY</a>

how do i extract only THE VALUE I WANT TO DISPLAY?

I switched from InfoPath to the Designer forms. In the list I have a Lookupfield that Points to another list. In the Control modes Edit and New the select boxes are created automatically using the usual elements

<SharePoint:FormField runat="server" id="ff6{$Pos}" ControlMode="Edit" FieldName="Betrieb" __designer:bind="{ddwrt:DataBind('i',concat('ff6',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Betrieb')}"/>
<SharePoint:FieldDescription runat="server" id="ff6description{$Pos}" FieldName="Betrieb" ControlMode="Edit"/>

The Problem arises in the ViewForm, where I usually use the following:

<xsl:value-of select="@Betrieb"/>

But since Betrieb is a Lookup field, it creates an a element and in the form i see:

<a href="http://portal/projects/buchungsportal/_layouts/15/listform.aspx?PageType=4&ListId={f1b5206b-3d88-4ea3-8aba-6c26b9dd07f8}&ID=1146&RootFolder=*">THE VALUE I WANT TO DIAPLAY</a>

How do I extract only THE VALUE I WANT TO DISPLAY?

Source Link
Emaborsa
  • 1.2k
  • 1
  • 11
  • 35

Extracting text from a lookup field in a SharePoint 2013

I switched from InfoPath to the Designer forms. In the list i have a Lookupfield that Points to another list. In the Control modes Edit and New the select boxes are created automatically using the usual elements

<SharePoint:FormField runat="server" id="ff6{$Pos}" ControlMode="Edit" FieldName="Betrieb" __designer:bind="{ddwrt:DataBind('i',concat('ff6',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Betrieb')}"/>
<SharePoint:FieldDescription runat="server" id="ff6description{$Pos}" FieldName="Betrieb" ControlMode="Edit"/>

The Problem arises in the ViewForm, where i usually use the following:

<xsl:value-of select="@Betrieb"/>

But since Betrieb is a Lookup field, it creates an a element and in the form i see:

<a href="http://portal/projects/buchungsportal/_layouts/15/listform.aspx?PageType=4&ListId={f1b5206b-3d88-4ea3-8aba-6c26b9dd07f8}&ID=1146&RootFolder=*">THE VALUE I WANT TO DIAPLAY</a>

how do i extract only THE VALUE I WANT TO DISPLAY?