51
Views
8
Comments
Solved
How can i add a button to take me to a record page, on a specific table entry?

Hello everyone! I have a small headscratcher that im sure is a relatively simple solution, but cant quite figure it out. 

In a nutshell i have to put a button (where the red circle is) that will relocate me to an existing page in a separate module that houses the logs of that process. That has already been created, i essentially just need to create a link on the button that points to the page. 


What I'm struggling to do is when i add a button onto the table column, it adds it for every entry onto that table, i only want it to show on "BACS Import" jobs as those processes are the only ones that have logs against them, all other jobs are surface level and have no logs anywhere else in our codebase. 

The screen that houses the logs of that job is within another module, can i simply point to it within the button onclick action if i build the dependency? 

Thanks in advance! 

2022-12-30 09-46-57
Deepika Patel
Solution

Hi Morgan,

As per my understanding, you want to show button only for "BACS Import " record and to send the user to a specific screen located in a different module when we click on that button. 

For this, you can add the if condition on the button which states that only when the record for the job column is "BACS Import,"  at that time the button should be displayed. ; you can add this in Visible property of button or just add If widget and in True condition you can drag the button.

And to redirect on the screen which is in another module you can use "External Site" .https://success.outsystems.com/documentation/11/reference/outsystems_language/interfaces/navigating_in_the_application/external_site/

Hope this helps!

2019-11-11 17-10-24
Manish Jawla
 
MVP
Solution

Hi Morgan Kemp,

Why don't you add a button inside a if widget and add condition to the if widget when job title contains BACs or whatever condition you think is suitable to display that button.


If you need I can share the oml as well for your reference but I think you can do it by yourself.

I have added the screenshot for your reference.

Hope it helps. 

Regards,

Manish Jawla

2022-01-13 11-06-04
Neha Sheikh
Champion

Hello,

Though I did not get the exact scenario from your explanation what I will suggest is that you are fetching the details using aggregate. In that aggregate use onAfter fetch and add a boolean variable wherever BACS Import appears in the name and then add a link in that particular row. 

If you can share OML then I will be able to help you more.

Thanks,

Neha

UserImage.jpg
Morgan Kemp

Hi Neha, thanks for replying, all i want is to be able to have it so that instead of having a button on every single entry on the table, i only want the button to show on entries that have the job title as "BACS", whereas currently i have a button against every entry, please see below, as sadly i cannot share the OML. 

I have a redirect to URL via java script within the onclick action, so that part is done. 

2022-01-13 11-06-04
Neha Sheikh
Champion

Hello Morgan,

You can do this in the visible property of Button. Add an If condition where if the name matched BACS then only you need to show the button.

Hope this helps.

Thanks,

neha

2022-12-30 09-46-57
Deepika Patel
Solution

Hi Morgan,

As per my understanding, you want to show button only for "BACS Import " record and to send the user to a specific screen located in a different module when we click on that button. 

For this, you can add the if condition on the button which states that only when the record for the job column is "BACS Import,"  at that time the button should be displayed. ; you can add this in Visible property of button or just add If widget and in True condition you can drag the button.

And to redirect on the screen which is in another module you can use "External Site" .https://success.outsystems.com/documentation/11/reference/outsystems_language/interfaces/navigating_in_the_application/external_site/

Hope this helps!

2019-11-11 17-10-24
Manish Jawla
 
MVP
Solution

Hi Morgan Kemp,

Why don't you add a button inside a if widget and add condition to the if widget when job title contains BACs or whatever condition you think is suitable to display that button.


If you need I can share the oml as well for your reference but I think you can do it by yourself.

I have added the screenshot for your reference.

Hope it helps. 

Regards,

Manish Jawla

UserImage.jpg
John Oliver

Hi @morgan kemp, I would suggest that you add the JobType Attribute in your jobs table and then you can use the If condition on that button. If(Jobs.JobType=Entities.JobType.BACSImport) true then show the button and keep the false branch empty. JobType is a static entity. Applying a condition based on a specific word is not the best practice. 

2023-10-21 19-42-11
Tousif Khan
Champion

Hello @Morgan Kemp  As I can see you want to show the link only to those rows where the job title is BACS , 

Now as suggested above in this post you can add a if widget and add a condition using index function, The Index Function returns an integer with the zero-base position of a keyword string inside another textstring and returns -1 if keyword is not found.

Now for the second part you can use redirect to url to navigate to different module screen, make sure not to hardcode the domain of environment.

I am attaching you an oml it will help you with this.

Sample - https://personal-ejuytnht.outsystemscloud.com/OutsystemsPOC2024/SampleDataEmployees

Thanks
Tousif Khan 

Outsystems_Use Of Index Fun.oml
UserImage.jpg
Morgan Kemp

Thank you all for your feedback, you all pretty much hit the nail on the head with what i was asking, thank you so much! 

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