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
?