Is it possible to keep track of the Revit ribbon buttons which were clicked on? - revit-api

I've been trying to figure out a way to record user interface actions to retrieve information about which ribbon buttons were clicked, but I've been unsuccessful so far.
I've spend a lot of time finding the related events in the API, but apparently there are none.

There are many ways to record user events in Revit. One of the simplest ways is to look at the journal file. It is always generated and stored automatically by Revit, so you don't have to do anything at all to obtain it. Look at its contents; all relevant user interactions are recorded there.
As said, there are other ways as well.
Afaik, recording which buttons are clicked is not officially supported and may be a bit tricky, cf. the Revit API discussion forum thread on obtaining button name using events for plugins working inside of another plugin.

Related

How can I track detail view opens in Bixby?

I need to track which detail pages are opened and how often in result sets.
To do my own logging, I would need to send a javascript put command when the user opens the detail page.
How can I do that?
This is not possible right now in a straightforward way.
If you're feeling adventurous, you can try using lazy-source:
https://bixbydevelopers.com/dev/docs/reference/type/structure.property.lazy-source
Make sure that only the details view of your concept is using the lazy-property, so it isn't loaded on the list-of summaries, since as stated in the docs,
Bixby calls the lazy source when the property is referenced either in a layout or dialog.

Create two edit button with different settings

I've created a version tracking that will show all the edited document inside view. What if I want to make all document be draft at the same time, and during that, document can't be edit. And after I click save, all draft document will be saved at the same time.
Edit 1
I have one more question when I do version tracking, how can I make all response document cannot be edit? only current document can be edit?
UPDATE QUESTION
Currently, I am using version tracking to show all list with all edit document. So for now, every time I click EDIT, it will show all history of updated.
So I want create a situation where I have 2 edit option which is EDIT and PC Specification. I want to set PC Specification after edit document, it updated all history under version tracking, but for EDIT I don't want it update under version tracking. Because, for EDIT function, it only for edit one or two information BUT for PC Specification, it is to update all information. For example, I have 3 documents inside the "Computer" view.
When I open one document, it will show document details. On top menu, I have two buttons which are Edit and Close Windows. So can I add one more toolbar? Which is PC Spec as below?
So I will click the PC Spec button on the toolbar then the documents will open as a new document with same document information. Same as edit function. After I click save, it overwrite document + show edit history
For another situation where I click EDIT, same as PC Spec but after I click save, it overwrite document only.
As shown below, the history is when document edit using PC Spec only.
Another question, I have "Archived" view. How can I show only history of document inside "Archived" view?
Hope you guys can understand this. Please ask me anything if you not understand. Any help will be appreciated. Thanks! :)
Regarding your second question, to make all response documents non-editable, you will have to
Give your regular users Author access instead of Editor access in the database's Access Control List and assign them a role, which I'll call "AppUsers".
Give yourself and anyone else who will be responsible for managing the app a role which I'll call "AppAdmins".
Add a hidden computed field with type "Authors" to the form and set the initial value formula to
#If(#IsResponseDoc;"[AppAdmins]";"[AppUsers]":"[AppAdmins]")
Note that this will not have any effect on existing documents until you refresh and re-save them.
Then, you're going to have to hope that automatic versioning refreshes the documents. I'm not sure if it does or does not. If it does not, then you're probably going to have to give up on using the native versioning and write your own version using LotusScript. As I recall, that's what was done in the standard Lotus document library template, because the native versioning is pretty limited in what it can do.
As for your first question, I'm sorry but I really don't understand what you're asking. I can't tell in some parts whether you are telling us what you have already done, or what you want to do. Here on StackOverflow, the best way to get useful answers is to show us very clearly what you have tried, tell us what happens, and tell us what you thought should have happened instead. This is a place for helping you fix your code, not a place to get tutorials that amount to explicit instructions on how to write your code in the first place.

SharePoint 2013 KnockoutJS Lookup columns

I have a basic knockoutjs project loading data from a SharePoint 2013 list scenario. Getting data and displaying data is easy, the problem that I'm running into is on the edit mode displaying the proper control. Everything should not be a textbox. This means the people picker control to dropdownmenus to calendar controls.
MSFT has some pretty good documentation on using the client side people picker control here"http://msdn.microsoft.com/en-us/library/office/jj713593.aspx
The problem that I have is calling this control inside my viewmodel.
Setting the value of the control doesn't look difficult courtesy of this blog post: http://www.sharepointcolumn.com/sp2013-setting-people-picker-value-in-newform-aspx/
I attempted to looking into computed values, but that doesn't seem to work. Does anyone have a blog post that I skipped over? The closest related post that I can find: http://yetanothersharepointblog.wordpress.com/2012/12/11/working-with-sharepoint-lookup-columns-in-knockout-js/
Lastly since it seems that I'm the only one doing this, does anyone think that I should not be reinventing the wheel with my forms and should just link each item to the appropriate SharePoint list item in edit or display view? I suppose that would be easier.
From a SharePoint Professional to another, I would highly recommend you to do that.
Just redirect the user to the item edit/display item page an let SharePoint take the leash of how to handle UI form elements.
Because, assume that you implement your custom form, what if the user decides to add one more site column to the list? Will you update your code to support another field?
From my personal experience with the beast I've come to the conclusion that structural implementation over already existent functionality tends to go wrong.
Also, if you have some kind of listing of items custom made and you want to provide editing, try to do something opening a pretty SP.UI.ModalDialog, its elegant and you use the sharepoint to do the work for you.
But it's just an advise.

Editing a closed case

I have a ribbon button on the case entity that updates a single two-option field on the form via javascript. When this is used on a case that has been resolved/closed it returns an error as the form is now read only.
Is there a way in javascript that I could get it to re-activate the form, change the field and then put it back to the way it was before? I have tried to force the change on the form but even if i manage to make it appear that you can save it, it will return the error as the form record is still counted as de-activated, even though you can change the fields
Thanks
You should be able to use a SOAP call for this, its a little involved, I would suggest starting here. You have to generate XML that represents the request, the link provides some tools to do this.
I believe you will need to issue JavaScript versions of SetStateRequest (to open) and CloseIncidentRequest (to close).
On the other hand, which is a different approach entirely, is to disable the button when the record is deactivated, then users have to manually renable the record make the change and close again. This is closer to 'working with the system' which I have touched upon here, its a different situation but the principle still applies.

Multiple Sharepoint Forms

I am trying to split out what I originally wanted in a single form. The downside was that I wanted to keep multiple lists and I found that I could not use a single form with multiple lists.
What I am trying to do is to keep my customer information in a separate list/form so I can re-use it in a different application as well.
What I would like to do is give a picker to pick the customer from a list, and if the customer is not listed to allow the creation of a new one.
What I am wondering is how I can leave the main form, create the new customer, and then return to the main form but with the new customer information passed to the new form as selected. In ASP.NET one of the ways I would do this is through the querystring, but I am not sure if that is doable or preferred in Sharepoint.
Any thoughts or links to tutorials would be great.
Please keep in mind that due to access/security limitations I am trying to do this strictly through the browser and Sharepoint Designer.
Thanks!
With your access limitations, I don't see a solution that will allow the refresh of the original form to get the new data. You may be able to hack in some JQuery stuff to do this, but I just don't see it being an easy/value-for-time thing to do.
You may just have to allow the form user to save the form without customer info and come back to it.
A list view can then highlight forms with no customer info. This all depends on the usage scenario.
You can use the Source query string parameter to get you back to the original form after completing the new customer form. However, unless you add some code (either javascript or server side) you won't get the id of the new customer.
The best option is probably using jquery and the sharepoint web services. It's quite easy if you start with the right scripts, and you can do something like your original plan - make a simple form in a jquery ui popup.
You can also use javascript to manage linking between multiple forms, but you need to be careful about clearing out already entered form data.
Another option would be to edit dispform.aspx and add dataviews for other lists, along with appropriate add buttons, and add javascript to the new customer form that sets the value of a connecting lookup field. However, that tends to require quite a bit of messing about with list guids and other undocumented bits.

Resources