cancel
Showing results for 
Search instead for 
Did you mean: 

To remove hash in hyperlink in sapui5

shil123
Participant
0 Kudos

I have requirement like,

the hyperlink will be in the below format:

->abcd#1234

but I want tat hash to be romoved and 1234 has to come in next line

abcd

1234

It can be done for text field but i want both abcd and 1234 to be links only

I have tried but it is only working for text field and not for links please find the below images for the reference.

In the below image i have given field name as Link in view so the output will be

I have given field name as text so the output is as following image

so please do help me achieving this i am struggling since i am a fresher.

former_member540067
Active Participant
0 Kudos

What's the approach you are following to remove the hash with which you are able to do in Text?

venkateswaran_k
Active Contributor
0 Kudos

Hi

You mean to say, it is folded? How you want to display ?

Kindly give more input.. Not able to get fully.

shil123
Participant
0 Kudos

I am writing this code in Controller:

_onObjectMatched : function (oEvent) {

this.Path = this.getModel().createKey("WorkSet", { ReqId : sObjectId })}

_bindView : function (sObjectPath, sObjectId) {

var urlData = oDataModel.oData[this.Path].url; // this.getView().byId("url").setText(urlData.replace("#", " \n"))};

venkateswaran_k
Active Contributor

try split the string by #

var array = str.split('#');

Accepted Solutions (0)

Answers (0)