Get group of form items by DataLabel - excel

I'm working on modifying some vba code, mostly adding a new feature to lock some of the form. So I was trying to use the DataLabel property for the items. And is looks to be a dead end.
But I hope its possible to group them and perform a group action in the form of enable/disable.
Any ideas on how? pretty open to any idea or solution simpler than disabling one at a time.

Related

How can I activate (display) a view using Revit API?

I am trying to activate a view using Revit API. What I want to do exactly is to prompt the user to select some walls, but when the user is asked that, he can't switch views to select more walls (everything is greyed out at that point).
So the view I want to activate (by that I mean, I want this view to be actually shown on screen) already exist, and I can access its Id.
I have seen threads about creating, browsing, filtering views, but nothing on activating it... It's a Floor Plan view.
So far I can access its associated ViewPlan object, and associated parameters (name, Id, ..).
Is it possible to do ?
Thanks a lot !
Arnaud.
I think the most preferred way is the UIDocument.RequestViewChange() method. The tricky part about this is that unless you've designed your application to be modeless with external events or idling, it may not actually happen until later when control returns back to Revit from your addin.
(There's also setting the UIDocument.ActiveView property - not positive if this has different constraints).
The other way that I have done it historically is through the use of the UIDocument.ShowElements() command. The trick here is that you don't have control of the exact view - but if you can figure out the elements that appear only in that view, you can generally make it happen (even if you have to do a separate query to get a bunch of elements that are only in the given floorplan view).
Good Luck!
I think the solution to your problem may be:
commandData.Application.ActiveUIDocument.ActiveView = View;
The ActiveView is a property and it has {get and set} options.
ActiveView has only a get accessor, what Mostafa suggests will not work.
I have used the RequestViewChange() method with a modal dialog and have not had problems so far.

Create domino view dynamically in XPages

I want to know if I can click a button in my XPage and dynamically create a Domino View and then show it in a panel control on the same page. The reason I want to do this is because I have a categorized view and I don't want to lose category data by using full text search. So I am thinking of creating a new view dynamically and pass my search parameters, like end date or start date, into the view selection formula.
Is it possible? Any other alternative solution is also welcome.
yes you can, but you don't want to. A Domino view takes space in the database and quite some time for its first use. So you end up with a lot of views taking space and the need to adjust database space after removal. Your response times will suck big time.
Categories as shown in Notes views are no web interaction pattern, so you might want to solve a problem that actually shouldn't exist.
The preferred method for Domino application is navigation / drill down over search. But you could do a FTSearch where you add your category to the search parameters and render your results in a repeat control instead of a view control. There you have more control over the look and feel.
Whether or not it's the best solution, the answer to the immediate question about creating a view on the fly is yes: the Database class has a couple "createView" methods to allow you to create a new view, either entirely from scratch or based on a named other view. From there, you can use the "setSelectionFormula" and "createColumn" methods in the created View to build what you want. You can't do EVERYTHING with those methods, but it may be enough.
One problem you'd likely run into is ACL access: you'll need Designer rights to the database, which a normal user most likely wouldn't have. If you use the sessionAsSigner object to fetch a signer version of the DB (say, "var signerDB = sessionAsSigner.getDatabase(database.getServer(), database.getFilePath())"), you can work from there. Off the top of my head, I don't remember if you will also have to up the "Maximum Internet access" setting on the last tab of the ACL to Designer as well, but you may.
I am assuming that you are referring to the problem that exists when you choose the documents based on the category. This is something that I find highly annoying and I wish that it was possible to turn this on and off. It makes sense for embedded views, but not for much else.
What I did to solve this was to include the category value in the next column. In this way that text could still be seen, even if it was a flat view.
Alternatively, you could also look into using a repeater control and create your own way of presenting the information. This would be used instead of a (Dynamic)ViewPanel control. You could then present the information any way you wanted as long as it is returned in the viewrow set.
Happy Programming!

How to insert, change or remove a single table item in Tabris?

I'm trying to understand how to design this using Tabris.
My current design updates the tableview by setting a new list:
viewer.setInput(list);
This is not what I want as this refreshes always the entire table with a nasty refresh view behavior.
What I want is just to apply a single change to the table, so remove a tree item, change or insert. Just spend some time to get viewer.insert(...), remove(...) working.
The TreePath required for this call is what confuses me. Tried to create one I'm pretty sure it is not correct.
Does anyone has a good example or any other suggestions to get me in the right direction?
Thanks,
Vincent
I recommend looking at the TreeViewer.replace method. With this method you can change a single item.

Need syntax to call a refresh on one component from another on the page

I have a fairly straightforward and common use case. A panel, in which resides a repeat control. The repeat control gets its content from a view lookup by key. Below that repeat control is another panel. This panel has a data binding to a new notesdocument. The panel has a couple of fields on it for the new document and a submit button.
It all works, however after submit (presumably in the "postSaveDocument()" event) I want to call back up to the repeat control and have it re-perform its lookup and refresh its content.
I'm looking to understand syntactically, how I can reference the repeat control and its properties and methods from elsewhere on the document -- and secondarily (though I can look this up once I get the first part figured out) what the refresh() method would be for that that repeat control.
Ideally, I think its something like: xp:page.repeatcontrolname.refresh() -- though I know that isn't right.
I'm sure once I see an example, it will apply to a myriad of other things.
Update :
I discovered that the repeated elements were actually refreshing but I wasn't seeing a new entry added to the list. The reason, ultimately, turned out to be that to add another entry to the repeat list I needed a new "control" -- but I'd checked that box (on the repeat control) that said "Create Controls at Page Creation". It was preventing my XPage from creating another entry for the new document to display!
This article explains the syntax for doing what you describe:
http://avatar.red-pill.mobi/tim/blog.nsf/d6plinks/TTRY-84B6VP
I have a feeling that this one captures the actual use case.
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Create_and_display_responses
The key setting that people tend to miss is "ignoreRequestParams".
Andrew,
The 'XSP.PartialRefreshGet' call was broken in Domino release 8.5.3 which results in the '_c9 is undefined' error.
Have a look at the article posted by Tommy Valand:
http://dontpanic82.blogspot.com.au/2012/03/patch-for-bug-in-xsppartialrefreshget.html
Basically to work around the problem a second argument is required to be passed to the call, for example:
XSP.partialRefreshGet("#{id:ExistingDevicesList}", "")

Lotus Notes 8.5 client hide action button

I am having problems hiding an action button in a view. We recently upgraded to 8.5 and the method I used to use no longer works. I used to be able to create a role in the acl. Then add this formula to the action button properties "Hide action if formula is true". This is the formula #IsNotMember("[StatusUpdate]";#UserRoles)
Thank you in advance for your assistance.
That is the correct formula. #UserRoles returns a list of strings containing the roles for the current user surrounded by brackets, as in "[Admin]":"[Manager]":"[User]"
It "smells" like a bug, but perhaps there is a workaround.
I would create a simple form with a computed field to show the user's roles, and make sure they are set correctly and calculating correctly.
If so, then create a new role in the ACL, say TestRole, and set yourself to that role. Create an entirely new button on the form and set the hide/when formula to #IsMember("[TestRole]"; #UserRoles); Make sure the button does not appear for you.
If all this works fine then perhaps there's some minor corruption in the database within the roles or design elements themselves, and recreating them from scratch might clear that up. Try deleting the role, and the button, and creating them again. (I realize this is a little far-fetched, but it wouldn't be the first time I fixed a odd problem in Lotus Notes this way.)
I would also delete the icon from the Notes workspace (assuming that still exists in 8.5?) and compact the workspace as well. I know in Notes 6 that cleared a lot of the locally cached design elements that were often the cause of strange behavior.

Resources