I want to have a text box have the current document_id displayed. Is there an XPath expression to get that?
The following XPath returns the current document id, the same that you see on the URL on the edit page you get by clicking on a form instance in the summary page.
xxforms:instance('fr-parameters-instance')/document
Note however that if you use this in a calculated expression, for new forms, the value won't show until a change was done in the form (e.g. users entered a value in a field).
Related
I’m using Oberon forms version 2019.2 CE.
In my form I have Dynamic Dropdown (with search) with country select (required field) and Text field with display code of selected country:
When I select country, in text field appears selected country code:
Now I can click ‘x’ sign to remove value form drop down:
Value in field 'code' has not been deleted. When I click Validate button no error is detected. It seems that when I use 'x' sign to remove value from dropdown, I remove only label, not value.
My question is whether it is possible to remove both label and value, when I click 'x' sign?
I am unable to reproduce this with Orbeon Forms CE 2019.2. This is what I am seeing when running this form. If this doesn't help, I'd recommend you update your question to include a link to a minimal form that you are using to reproduce this, with steps to reproduce (and then post a comment, for notification).
It looks like the problem occurs when I use ‘Service performs search’ option set to ‘Yes’. Below you can see how it looks like in my form:
Source code of the form: here
I'd like to add clickable links to a Kentico Report. The report editor allows you to add all kinds of HTML mark-up in the layout, but it doesn't allow you to add HTML INSIDE of a table that you've inserted into the layout. (Or if it does, it is not obvious from the UI, or from the Kentico documentation.) I want a link to appear in each row, and the link should include a value from that row.
Clicking any of the links would open another page that shows more data about a particular record. In my case, my first column is an ID column and I want its value (in each row) to behave like a hyperlink to another page whose URL includes the clicked ID value as a parameter.
We can use jquery within our Kentico report to allow each value in a particular field to cause a link to be opened when clicked. In my case, I have a URL into which I want to embed an ID value from the report. I want to open one of the admin pages whose URL looks like the following (where 9999 is replaced with a record ID from my report):
/CMSModules/AdminControls/Pages/UIPage.aspx?elementguid=00000000-0000-abcd-0123-000000000000&objectid=9999&displaytitle=false
So let's assume the first field in the report is an ID column and we want to make the displayed ID behave like a link to some other page.
First we need jquery. Edit the report's layout in '<>Source' mode and add a script reference for jquery, such as one you can get from code.jquery.com, or just reference it locally if you have it:
<script src="/jquery-3.4.0.min.js"></script>
Next, we must find each ID field and then make it behave like a hyperlink. To do so, we find the <th> with the ID column's title, walk up to the <table>, and then find all <tr>s immediately under the <tbody>. Once we have each <tr>, we iterate through them to:
underline the ID value like a hyperlink
set the cursor to a hand like a hyperlink
add an onclick event to do open a URL (in a new tab) with my ID field's value
So here is the script. Add it just like you added the jquery script tag. (but add it after the jquery script tag)
<script>
$('th:contains("MyIDColumnTitle")').parents('table').first().children('tbody').children('tr').each(function() {
$(this).children('td').first()
.css('text-decoration','underline')
.css('cursor','pointer')
.click(function(){
var thisId = $(this).text();
var u = "/CMSModules/AdminControls/Pages/UIPage.aspx?elementguid=00000000-0000-abcd-0123-000000000000&objectid=" + thisId + "&displaytitle=false"
window.open(u,'_blank');
});
});
</script>
Keep in mind that if MyIDColumnTitle is not very unique, this script may find the wrong th and table. Modify the jquery selector to suit your needs. You may want to add a wrapping element around your report that has an element ID so you can be specific with your selector.
It wouldn't be difficult to take the same concept and use it to launch a page in a modal dialog instead.
I'm editing the Wikimedia template for {{Property Proposal}} on Wikidata.
When there's no example filled in the template the template says "missing".
This is achieved by having the field marked with "required = true,"
I would like to have a similar message on the "|subpage = ?" when that field is missing, however I don't want it to show anything when the field is filled (then the content of the field shouldn't be visible to the user.
Is there a way to get this outcome?
I want to send SSRS report field as querystring paramater to my application page. for this I have done following steps:
To add a hyperlink in report:
In report design view, right-click the text box I want to add a link and then click Properties.
1.In the Properties dialog box, click Action.
2.Select Go to URL. An additional section appears in the dialog box for this option.
3.In Select URL, in expression that evaluates to a URL, in pasted my pages url and concatenated it with field value in the below manner.
http://localhost:64970/InvoiceManagement.aspx?a=Fields!INVOICE_NUMBER.Value
Click OK.
but on running report and clicking on the hyperlink, it redirects me well but in querystring i got Fields!INVOICE_NUMBER.Value, it doesnt get replaced by its value(database value which is int), which should be the Invoice number.
where I am going wrong..
Your field is being evaluated as a literal string. You need to write a function to generate the URL:
="http://localhost:64970/InvoiceManagement.aspx?a=" & Fields!INVOICE_NUMBER.Value
There should be a function box for URL target you can click in the properties dialog, or you could paste the function code in over your URL's text. Note: I'm using VS to manage my SSRS reports, and I'm unsure if these methods are the same for BIDS, if that's what you're using. The problem is the same either way, though.
New to Struts2.
I have a search criteria form(search1) ,where I have dropdown lists to submit to get a result page (consolidatedreports.jsp).
In my result page, I am showing the data from the search criteria, but I also have a form at the top of the results page with search2 criteria to submit again.
I am chaining my actions because the heading for the results page needs a value from the search1 criteria to determine a heading value.
This works
Question
Now I want the heading to change when I use the search2 form in the results page.
How can I use the values from the search criteria in the search1 and override search2 values in the results page when a user chooses new criteria to run a new report on the results page?
I am modifying someone's code so it has to be done like this.
Can someone suggest a link so I get some information?
please clarify your question...
Using the search criteria and the value which you have entered in your first search page go to your action class.
There you have to check what are your search criteria.
Based on the criteria your codes for selecting values will be get differentiated.
That is you have to use if else if or some switch for each case according to your criteria.
Then in each case you have to bind your values into a list(if it is a server side coding.) and return the control to forwarding 2nd search page.
If it is a client side coding, you just need to return to 2nd page.
In the second page at top you can put your search boxes as in 1st page. then you can get the values from the list and print them, if its server side coding.
If its client side coding, get the selection value for criteria from action page , find the results using your calculations. print it..
the same action class can be used for your second page's search field also..
while submitting the form, keep a hidden field which will specify the name of your page, so that we can identify which search criteria is printing result, using that value you will be able to change your header values also.