139
Views
6
Comments
Solved
Screen title - Reactive
Question
Application Type
Reactive

How to get screen title in the Input parameter? 

Have to show each page title in the each screen?

Example:

This is my block-below-I have used this block in the Layout 


2023-04-16 15-25-31
Krishnanand Pathak
Solution

Hi @K C S ,

Sharing the oml in which I have achieved to get screen title using JS(Not from URL) and passed it to the block as input parameter.

Hope it will help.

Regards 

Krishnanand Pathak


 

ScreenTitle.oml
2022-10-12 15-20-13
K C S

Hey Thanks a lot. It's working perfectly. 

2024-11-25 22-05-29
Sergio Aznar Guallar

Hi K C S,

you can get it just by using this JS node in a client action of an On Ready event:

document.location.href.match(/[^\/]+$/)[0] 

then pass the output parameter to the input parameter of the block,

let me know if this was helpful for you


Kind regards,
Sergio

2022-10-12 15-20-13
K C S

Hi, 

I need it from the Title, not from the href. Tried with href using substring.

2023-03-16 16-29-51
Paulo Rosário

Hello KCS, 

You just need to add an input parameter to your screen and use that value as the Tite.

Hope it helps!

Paulo Rosário

2022-10-12 15-20-13
K C S

Hi , 

I tried like that. Create a block and used that in the Layout menu with input parameter. Tried with Substring and Index from current screen url. 

If we use block in layout it will be sub menu which we can't access in other screen


Substr(Substr(GetBookmarkableURL(),Index(GetBookmarkableURL(),"/",searchFromEnd:True),Length(GetBookmarkableURL())),1,1000)


But I'm getting --- Page1?Ex=1 like this.But I need only Page1.


Also, I need to achieve this from the title not the URL.


2023-04-16 15-25-31
Krishnanand Pathak
Solution

Hi @K C S ,

Sharing the oml in which I have achieved to get screen title using JS(Not from URL) and passed it to the block as input parameter.

Hope it will help.

Regards 

Krishnanand Pathak


 

ScreenTitle.oml
2022-10-12 15-20-13
K C S

Hey Thanks a lot. It's working perfectly. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.