cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori element #WITH_URL

luc_olivier2
Explorer
0 Kudos

Hello,

I created CDS Views and Fiori element app.

Everything is working fine, except one thing.

I have a field with a url and I put the annotation

#WITH_URL

I can see the field as a url and if I click on it is going to my address but in the same page.

How to do that it is opening a new tab in my Browser?

As a precision, the format of my URL is "http;//www.mywebsite.com?id=abc".

Is there something to put before ?

Thanks for any help,

Luc

Accepted Solutions (1)

Accepted Solutions (1)

luc_olivier2
Explorer

Hello,

I solved my issue by adding a window.open

CONCAT('javascript:window.open( "https://wwwdev2.xxx.fr/FRBFiche.action?ficheId=', CONCAT(zfrb_fiche.numfrb, '")')) as custoUrl,

I though #WITH_URL will do it alone !

Fiori Elements and CDS Views are full of surprise 🙂

Luc

Answers (1)

Answers (1)

former_member105680
Active Participant
0 Kudos

Hello,

See our documentation with sample code on how to do this:

With URL

I hope this helps.

Aziz

luc_olivier2
Explorer
0 Kudos

Hi Aziz,

Thanks for your answer. Yes I followed this documentation.

But perhaps the building of my url is not good?

In the CDS_I_View, I put

concat('https://wwwdev2.xxx.fr/FRBFiche.action?ficheId=', zfrb_fiche.idsite) as custoUrl,

And in the CDS_C_View, I wrote

@UI.lineItem: {position: 20, importance: #HIGH, label: 'N° FRB', type: #WITH_URL, url: 'custoUrl' } //Table column 2
ZFRB_I_EMBARQT.numfrb,
ZFRB_I_EMBARQT.custoUrl,

Should I add something to my concat in the I_View ?

Thanks,

Luc