IT Monkey will place code here as examples of what Cireson's consulting team has to offer as well as examples for public consumption to benefit the Microsoft System Center community as a whole.
DISCLAIMER
All files and projects located here come as is and without any warranty or support. We will attempt to improve the projects as time goes on based on customer and community demand. Comments and improvements are welcome as well as customization requests. Your use of these Cireson Uploads is subject to our Terms of Use.
Cireson's support team has no information on these projects outside of what you have available and will not provide support for these enhancements, extensions, and scripts.
Dont forget to checkout solutions uploaded by our customers, partners and community members here.
Comments
I get an error in browser console
Just reading the error message it looks like there is a typo in the code.
keydowm
should probably bekeydown
Is there an option in @Autocomplete, to enable searching on all attibutes, not only firstone?
eg. I have a promt for device(printer) with name (made by model and assettag) and serialnumber.
Result - I can search only by name (1) and when search by serial number (1) there are no results.
The control works by passing the text input by the user into the criteria defined in the Request Offering. If you configure the Query Results prompt in the RO to search against multiple attributes it should also work in the Autocomplete control. So you need to define the Query Results prompt so that DisplayName contains the text field or Serial Number contains the text field.
The UI is unfortunately a bit limited. You should however be able to build the RO with the AND condition, save it, and then export the Management Pack. Change the criteria in the MP, increase the version number and reimport it back into SCSM. The downside is that the UI will not show the edited criteria, so you do need to be careful when editing.
instead of trying to explain it again, here are the comments from the file explaining how to use it, then an example of how we are now using it on a form currently.
one of the forms we have this successfully running on is an Incident ARO which is used to report Software Issues. We have our business services setup, for web applications etc, which they need to be able to select from, but they also need to be able to select from software that is installed. but we decided that giving them a full list of software (including different versions) would make the list too long and confusing.
so we have added a new projectiontype which just gets softwareitems related to a computer (which means it is installed on that computer) then on the form a MultiSelect for putting in the Computer Asset ID, and have the DataMerge attributes added to it, and another multiselect which is set on the aro to select Business Services , this 2nd aro had the adddata datamergeproperty added to it,
so in the User Prompts of the ARO it looks like
The GUID that is passed in the first @AddDataMergeProperty is the GUID of the TypeProjection we created to get the installed software on a pc.
As the properties entered above are set, any computer assets entered into the first multiselect, are then checked to get a list of all software installed on any entered items. and then the adddata on the 2nd multiselect basically says to merge returned items into the 2nd multiselect.
using the request offering on the portal ends up as the below
no computers selected, the 2nd (business services) multiselect only shows business services as it normally would
once a computer is added to the first multiselect, it also shows matching items of software actually installed on that computer (can be multiple computers added) as well as the business services the multiselect is setup to show
yes i know it's a little complicated to explain, but can be used to make forms a lot easier for customers
latest file attached (latest version is in GITHUB as well)
I've been working with @Ryan_Kennedy1 on this one, we had people complain that there was nothing to indicate how many characters they had to fill in on a field before being accepted when there was a minimum length set.
we decided to have this display below the field where required, but also have the option of showing the amount of characters they had left after entering the minimum, this is tnhe result, comments from the file below to explain it, and a couple screen shots showing the results. latest toolbox version attached at the bottom.
this option, if used, should be placed directly before the text entry on the request offering
Having said that, we are noticing that conditional show/hide of multiselect, single select, and autocomplete fields are permanently hidden when any type of logic is applied in the Layout section of an ARO. Is anyone else noticing this, and/or is there a certain recommended technique to make sure that they are properly rendered when applying show/hide rules?
It is entirely possible that I am missing something obvious, or something that may have been mentioned earlier in this thread, but I am not seeing it at the moment.
There may be some issues around the ordering of the extra fields, i'll do a post in a bit showing the best order to have things in so they do not interfere with each other
I will be creating an improved version of those controls which should not have the same compatibility problems. I just need to get some other work out of the way first.
The general idea is that the controls work great if the ARO layout says "Always Show" next to them, but they are always hidden if "Show When True" or "Show When False" are applied. It does not seem to matter if there are multiple controls or what order the conditionally shown controls are in relation to others, for example.
However, I do not know this code like you do, so I would not be surprised to find anything that we have done is causing this, or that there is a way to work around it that I do not know about.
I see the issue already
there appears to be an issue when using the Booleans on 8.2 with the toolbox. we currently have some working quite successfully on 7.4, but when we put it into our DEV environment which is 8.2 we started having the same/similar issues. on an initial check the criteria the ARO was putting out itself appeared to be wrong and not what we had selected in the ARO. I haven't looked into this fully yet, so not sure if a bug report needs to be filed.
the particular instance we had was having 3 check boxes showing only, and as one was checked the other 2 would be hidden.
for some reason when we had them set to "show when true", and the "question equal to false", the criteria ended up in the code on the portal as "show when not true" and the "question equal to false". this caused none of the fields to show at all.
to get around it on our DEV system, i changed the criteria to "show when true", and the question to "not equal to true". this appeared to put the correct criteria out to allow the show/hide code in the toolbox to correctly work with it and show/hide the fields correctly. NOTE: this only modifies the Boolean criteria if there is more than one criteria to process, if there is only the one Boolean on the grid view then no modifications are performed.
I will be having another look at this, but you could try modifying the way you have the criteria set to get this working.
I'm trying to show a picker when a single boolean is true, so I changed the logic to be "Show When False" and "question not equal to true" (I think this kind of reverse logic counts as hazing the next person to try to modify the form, but I digress). Just as before, other non-toolbox fields that test that same boolean show/hide as expected, but the picker is always hidden.
I am only using the criteria in the ARO form, not any of the extra features in the toolbox pertaining to criteria.
i'll send you a private message so we don't fill up here with lots
I've been testing it in my lab and when i use the @autocomplete and @multiselect i cant get the filtering to work with our distribution lists it just gives me a full list, i think it may be because they all start with #
@john_doyle I've added a tested the datepicker control with the UTC tag but this produces the same issue as before where if I enter a request from my machine UTC +0 on my cayman portal server UTC + 5 and put in a request at 00:00 this is saved into the system as 05:00 so is still based on the management server date not my date
I can also confirm on 8.2 the issue with show/hide of autocomplete & multiselect
I have removed the following section
that was in there to handle Boolean's in 7.4 and can confirm that these two situations now work as expected without the need to check/uncheck them first
Show on True Bool is equal True
Show on True Bool is not equal True
for me this covers all bases for for show and hide on Boolean
I have managed to duplicate his error, but only on firefox, and it seems that what is causing it in my duplication is something completely different, as it only affects FireFox not all browsers like it does for @Tom_Hendricks
We will get it sorted out though
If the null values are working ok on 8.2, then taking the calls to that procedure out should work ok, not sure if we can add to the code itsel;f to only call it if the version is 8.2 or above though, even if it still gets called on 8.2 it should still work, we have a few requests using multiple check boxes to hide/display fiels that are using that part of the code that work quite sucessfully