Href link on a portal widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 05:23 AM
Hi
Can someone please advise where I am going wrong on my html code. I have merged 2 widgets together to make it look visually better for the end user
The last button is the button I have merged into my existing widget that allows a end user to edit the details in the request. When you click this link it takes you to another view of the ticket that displays the variables allowing the end user to change details if required. This button works fine, but I really want it to follow the logic and formating of the first 2 buttons. I have tried to merge the working code from the 2nd widget, but when clicking the "This is the button I want to use" nothing happens
The screen shot above shows on lines 12-16 the working button, but I want line 8 to have the same action/output, that when clicked it takes you to the edit view of the ticket.
I am sure I am just missing something slight. The only reason I want this to follow the same formatting is I can control when the button is visible, as it should only appear for Request, not Incidents
Many Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 05:49 AM
you are missing "<" in anchor tag, it a syntax error.
It should be something like:
<button ng-if=""><a href="link"/></button> // you can add your conditions accordingly.
Please mark the answer correct/helpful accordingly.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 06:28 AM
Hi Raghav
Thanks for that, the button now links to the variables which is great, but it has left me with an odd visual error.
This is what the html looks like now
When viewing a Request the button displays correctly as shown below
But it should not appear for a Incident, but as you can see below there is a small green button (with no text) displaying . Only the "Reopen" button should be visible
I think something is still slightly amiss with the line of code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 07:10 AM
You need to check the record in server side maybe using $sp.getRecord() and store that in data.var
Once you have data.var, you can use that in ng-if in html to show that for requests only.
Raghav
MVP 2023