powerapp adding changing hyperlinks - html

I am extremely new to Powerapps in fact this is my first project with it. What I want to do is link to a web-page that contains a Knowledge base the body of the hyperlink stays as it is the only thing that changes is the ID it needs to look for.
I have created an app and each article contains its own KB# and i need that KB# to be inserted into the hyperlink. The Text I marked in bold below is the only change in the link. I have created a button that should run the Hyperlink once click and in the OnSelect area I add the below but that is just a static link.
If(Rule2, Launch("https://placeholder.com/nav_to.do?uri=%2Fkb_view.do%3Fsysparm_article%3D||KB0010007||%26sysparm_stack%3D%26sysparm_view%3D")
, Launch("https://placeholder.com/nav_to.do?uri=%2Fkb_view.do%3Fsysparm_article%3DKB0011526%26sysparm_stack%3D%26sysparm_view%3D")
)

You should use string concatenation operator &
In your case:
If(Rule2,
Launch("https://placeholder.com/nav_to.do?uri=%2Fkb_view.do%3Fsysparm_article%3D||KB" & DataSource.column_name & "||%26sysparm_stack%3D%26sysparm_view%3D") ,
Launch("https://placeholder.com/nav_to.do?uri=%2Fkb_view.do%3Fsysparm_article%3DKB0011526%26sysparm_stack%3D%26sysparm_view%3D") )

Related

HTML-assigned 'id' Missing in DOM

Within the Moodle (v. 3.5.7) Atto editor (using both Chrome and Firefox) I've been trying to assign an ID to a particular row class, "span9". My ultimate objective is to assign this a unique ID and reference this element via jquery so as to append another element within it.
The ISSUE is that once I add an ID (id="checklist01") and click save, the ID simply does not appear in the DOM, and seems to not exist. When I re-enter the atto editor however, voila, there it is just sitting there. So it's NOT being removed completely... just not expressed somehow?
I have 2 screenshots linked below showing (1) the editor view, with the element and assigned ID highlighted, and (2) a screenshot of the DOM once the changes have been saved, with that same area highlighted, without the assigned ID.
Screenshots of ID Missing from DOM
Bootstrap ver. 4
So far I've tried switching the placement of the id in the atto editor (class coming first vs second after ); tried to add a "span" in front of the id (for some reason, I was desperate); and really just searched all over for someone who has encountered something similar.
I'm not sure how much help the html will provide, but here it is:
<div class="row-fluid colored">
<div class="iconbox span3">
h4>Your Completion Status (%)</h4>
</div>
<div id="checklist01" class="span9">
</div>
</div>
I found the reason for the removal of id attributes.
id attributes are removed because "Checklist" activity used safe HTML function of Moodle. If you want to access id attributes of description HTML follow below steps.
Go to mod\checklist\locallib.php file.
Then search formatted_intro() function (which is around line number 880).
In that function they used Moodle's format_text() function to return description text.
In that function, they have used 3 parameters.
string $text The text to be formatted.
int $format Identifier of the text format to be used
object/array $options text formatting options
Replace
$opts = array('trusted' => $CFG->enabletrusttext);
to
$opts = array('trusted' => $CFG->enabletrusttext,'allowid'=>true);
Then save your file and check. By following the above steps you can use id attributes.

How to include template's value inside link or table in MediaWiki?

I search the documentation but I didn't know exactly how to call that.
I have a template Index2Name that return a name based on an index.
I'm trying to use that name in a link:
[[Articles/{{Index2Name|0001}}|{{Index2Name|0001}}]]
or
Image:Big-0001.png|link=Articles/{{Index2Name|0001}}|''{{Index2Name|0001}}''
In the last example, the name is printed but the link doesn't work. (In gallery element)
It doesn't work. The value from the template is printed but it is not converted to a link.
How can I make this works? And does this have a name? (For future reference)
EDIT: Index2Name is a simple switch returning a few words depending of the id. Since I'm using subpages I only want the name to appear (Example: MyArticle) but the link is Articles/MyArticle
Could you clarify exactly what you want to happen please. (Where you want to link and how you want it to look).
But for example if you use:
[[Image:Big-0001.png|''{{Index2Name|0001}}'']]
It will link to the page Image:Big-0001.png with the link text being the output of:
''{{Index2Name|0001}}''
Or if you use:
[[Image:Big-001.jpg|link=Articles/{{Index2Name|0001}}]]
The image, when clicked, will redirect you to the output of:
{{Index2Name|0001}}

How to get a html element content

I want to ask if there is a way for me to get like a web element content. What i mean is:
the site
the program
You don't need to type the site address or where the element is, in need it only in this case(fully empty site with a few words only).
My question is that, wets say that you have a text on a webpage, and you want that text to appear in a textbox...That's it
you can use this :
Dim We As New System.Net.WebClient()
textbox1.text = We.DownloadString(_Url)
We.Dispose()

SilverStripe Tab Customization

In SilverStripe's CMS I want to remove the Content tab within a page. I can do this as follows:
$fields->removeFieldsFromTab('Root.Content.Main', 'Content');
I then want to create my own custom tab:
$fields->addFieldToTab('Root.Content.MyTab', $myField);
However by adding my own custom tab it brings the Content tab back.
The other option is just to make MyTab the default 'up' tab. Is that possible?
SilverStripe 2.4
To remove the Content tab in SilverStripe 2.4:
$fields->removeFieldFromTab('Root.Content', 'Main');
And to add a field to a tab named MyTab:
$fields->addFieldToTab('Root.Content.MyTab', $myField);
SilverStripe 3.1
To remove the Content tab in SilverStripe 3.1:
$fields->removeFieldFromTab('Root', 'Main');
And to add a field to a tab named MyTab:
$fields->addFieldToTab('Root.MyTab', $myField);
Notes
Removing the Content tab means you cannot control the page title.
removeFieldsFromTab removes a number of fields from a Tab/TabSet within this FieldList. It takes an array of field names as the second parameter.
removeFieldFromTab removes a single field from a Tab/TabSet within this FieldList. It takes a string field name as the second parameter.
In your case you want to use removeFieldFromTab not removeFieldsFromTab.
I know this question is old but I had same problem and I've figured it out.
In getCMSFields() method I wrote
$fields = parent::getCMSFields();
$fields->removeByName('XXX'); //this line removes tab
return $fields;
where 'XXX' is name of my tab 'Root.XXX'
I hope it'll help someone.

Passing values to an URL in SSRS and opening the URL in a new window

I'm trying to use the following to open a new window while passing some values to the url. I'm new at this so I'm guessing it's something minor.
="javascript:void(window.open('https://website.com/Move/Closeout.aspx?cusid=" & Fields!CustomerID.Value & "&soid=" & Fields!SalesorderID.Value', '_blank'))"
In the report, the link doesn't even appear as a link and when I click on it, nothing happens.
You need to set up the url as a navigation link. So your field expression will simply be Fields!CustomerID.Value then right-click the cell, select Text Box Properties... then Action. Select the Go to URL radiobutton and enter your javascript expression in there:
="javascript:void(window.open('https://website.com/Move/Closeout.aspx?cusid=" & Fields!CustomerID.Value & "&soid=" & Fields!SalesorderID.Value', '_blank'))"
This will turn the displayed CustomerID in the cell into a clickable link.
I also change the Font.Color to Blue to indicate it is a link.