Is there a way to hide thisĀ¹ from users?
even though I like to use this very much, it's kind of irritating to have these tags at the top of the report.
(1) It's the thing that appears when you do ACTION/FORMAT/Highlight on an interactive report. It also gives user the ability to edit highlighting conditions, when they click on it.
Inspect the element in the browser dev tools. Notice that the container div around the interactive report filters/formats has a class a-IRR-controlsContainer. With this info you can get to work.
Create a dynamic action:
Event: After Refresh
Event Scope: Dynamic (if you set this to static they will reappear on partial page refresh)
Add a true action:
Action: Execute javascript code:
Code:
$('.a-IRR-controlsContainer').hide()
Fire on initialization: true
Note that if you do this, it could be confusing to users because they can add a filter but no longer remove it (since that control is hidden...)
Related
I'm working in HCL Notes application. I have developed a summary view to show calculated figures to the user. Then the user clicks one of the action buttons and I open a detailed view, but for that view I setup Selection Formula on the fly so that it shows the records filtered specific to that button conditions. It was working almost fine for a few days, but now most of the time it shows some previously shown (filtered) data no matter what button the user has clicked. Means it doesn't set the Selection Formula of the view and shows the view with the old formula and it won't get back to normal condition even if they restart Notes application.
When the user is stuck in this particular condition, and they peep through the status bar it shows this message:
Document has been modified or corrupted since signed! (data).
The necessary code-snippet is as below:
*Set dtlView = db.GetView("Report_Dtl")
dtlView.SelectionFormula =formula
Call dtlView.Refresh()*
where formula is the dynamically built formula. Looks like the line
dtlView.SelectionFormula =formula
is unable to update the selection formula and then the line below generates the above error message:
Call uidb.OpenView(dtlView.Name,,False, False)
Please help!
Thanks
For "on the fly" modification of the view selection formula your user need "Designer"- access to the database, and that is never a good idea. The help document to the function you are using is explicitly stating that this is not a good idea (emphasise of mine):
This is not a good way to display a selected set of documents for a specific user. When you use this property to change the view selection, it applies to all users of the view.
There are problems with using this method to make a view display a new selection of documents for an end user:
Do not give end-users Designer access to an application.
If it is a shared view, users will interfere with each other's searches.
The NotesĀ® client caches design information, and there's no way to tell it to update its cache (except for outlines). Exiting and re-entering the application usually works, but it's hard to programmatically ensure the user exited the application entirely.
In addition the modification of the view selection formula can break the signature of the design element and then other errors occur.
Better use another approach:
Use a Folder for every user and put the selected documents in there (after doing a NotesDatabase.Search with the formula
Use a separate view for every user and let a server agent manipulate its selection formula with a user that has access.
For having a separate view / folder for every user you could use "Shared, Private on first use"- views (they are not easy to maintain), or any process that generates them and is able to assign every view to the users they belong to... in both cases this needs some effort, but at least it will work.
I have 3 radio groups on my page. When user selects a value in the first radio group, if it is a particular value, the selection in the other two radio groups gets reset to default and they get disabled to prevent changing them.
The issue is that built-in apex Disable action uses disable javascript property so the value of the radio groups gets removed from session. It would need to use javascript equivalent to readonly, which, as far a s I know, does not currently exist in apex.
How can I get around this issue to enable/disable the radio groups based on a selection in another radio group while still being able to access selected value from my code?
Part of the problem is that readonly doesn't apply to radio buttons, as per the spec. Here's a solution that should work for you but be sure to test in multiple browsers...
Add this function to the Function and Global Variable Declaration attribute of the page:
function preventRadioSelection(e) {
e.preventDefault();
$(this).blur();
}
Add this CSS to the Inline attribute of the page:
.sudo-disabled+label {
opacity: .5;
cursor: default;
pointer-events: none;
}
When you need to Disable an item, use the Execute JavaScript action with the following code:
$(this.affectedElements).find('input').on('click', preventRadioSelection).addClass('sudo-disabled');
Then set Affected Elements to the item(s) you want to disable.
When you need to Enable an item, use the Execute JavaScript action with the following code:
$(this.affectedElements).find('input').off('click', preventRadioSelection).removeClass('sudo-disabled');
Then set Affected Elements to the item(s) you want to enable.
Keep in mind that all of this is client-side, and could be worked around by someone that knows what they're doing. You'll need to enforce your business rules with server-side validations.
I have a list applet with a drilldown in one of the columns, and I want to enable or disable it based on another field's value. Something like a dynamic drilldown, but instead of choosing a different view, I want to disable the navigation for some of the records.
Can this be done in Siebel 7.8?
Ideally without server scripting... and definitely without ugly browser scripting hacks, please.
I have tried creating a dynamic drilldown, but it doesn't work because I have to specify a target view in my parent default drilldown. If I use an inactive view for that, then the whole dynamic drilldown is ignored and Siebel simply uses the one with the next sequence number.
I can think of a couple of ways to implement it, but both are far from ideal:
Writing some server script to detect the drilldown event before it happens, and abort it if needed with a RaiseErrorText message. It should be doable... but I'd rather disable the drilldown than throw an ugly error to my users.
Placing the drilldown in a calculated field, and make it have no text when there should be no navigation. If there is no text, there is nothing the users can click to drilldown, right? But I would have to add a new column just for the drilldown, which would be confusing for the users.
If you don't want any scripting. There are 2 ways.
First way is using toggle applet.
1.Main Applet will have the drill down down object. And Toggle applet will not have the drill down objects.
2.Create a field in the BC to use it in the Toggle Applet condition .Toggle Applet will be displayed when the drilldown is not required.
Second way you can achieve it is through visibility Type attribute in the drilldown object as well as visibility Applet Type attribue at the view level.
Apex 4.1.1.00.23
Can I change the IR default Reports label from "1. Primary Report"?
I found this code, and it works for the page load, but changes back to the default when the page changes or other saved reports are picked.
<script type="text/javascript">
$(document).ready(function() {
changeIRText('1. Default');
}); // end of ready function
function changeIRText(pText){
$('select#apexir_SAVED_REPORTS').find('option').each(function(index,elem) {
$(elem).text(function(i, text) {
return text.replace('1. Primary Report', pText);
}); // end of changing text
});
}
</script>
When the report is paginated, the html source is also replaced. You need to bind to the apexafterrefresh event on the IR region aswell, or create a dynamic action which fires on the "After Refresh" framework event, with triggering element the IR region.
You can best achieve a manual bind through assigning a static id to the IR
$("#my_ir_report").bind("apexafterrefresh", function(){changeIRText('1. Default');});
Code in page attributes
Rightclick the page and select edit.
Go to the "Javascript" region.
In a dynamic action
Put the javascript function in the page attributes. This is good for code reusability. However, if you don't use it outside the dynamic action, consider simply putting the code in the dynamic action. There is less harm though, as when you will see the dynamic action and inspect the code it runs you'll see that it calls a function, and you'll know that that will be in the page attributes or an external javascript file.
Create a dynamic action, type Advanded. Fire on after refresh, and select your IR region.
Dynamic action properties:
In the true action, select Execute javascript as action. Put in your code. When the dynamic action has been created by the wizard, go back into the true action properties and make sure you check the 'Fire on Page Load' checkbox! This will make sure that not only your code will run when the report is refreshed, but also when page loading is complete, and saves creating another dynamic action!
True action properties:
In closing
Being unfamiliar with javascript is fine, you'll pick it up over time. But do pick up some dynamic action knowledge! Don't cram script tags over your page, they'll be much harder to maintain and harder to remember if and where they are!
Oracle tutorial on dynamic actions
Skillbuilders youtube tutorial on dynamic actions
I am working with sitecore and now i needs to hide some of the content item in sitcore.what is the process to hide the content'
Why do you want to hide and what do you want to hide?
You could probably setup security to only allow people with certain roles to read, write, etc certain items (and subitems) or setup that only certain roles can see certain fields.
You can probably find most of what you need here:
http://sdn.sitecore.net/Reference/Sitecore%206/Security%20Administrator%20Cookbook.aspx
Otherwise give an example of what you want to do, it might be easier to help then.
If you want to hide from a role or a user, you can setup permissions accordingly to do so. Please specify the requirement.
Perhaps not exactly what you need, but it's not really clear. You can hide items from regular (= non-admin) users by setting the checkbox Hidden as such, which can be found in the Appearance section of your item. When hidden, your items will be displayed in grey and italic in the item tree for administrators, and totally non-visible to users. Note that if you cannot find the section, you need to enable the Standard Fields under View in the ribbon.
Of course this field is also accessible via the API by any of these two means:
item.Appearance.Hidden = true; // Or false.
item[Sitecore.FieldIDs.Hidden] = "1"; // Or string.Empty.
Hide items from non admin users by using 'Hide Item' button in configure ribbon.
Protect items from non admin users by using 'Protect Item' button in configure ribbon.