Servicenow "Business Rules": What tables allow me to view business rules? - servicenow

Hopefully an easy one. Which Servicenow table enumerates business rules ?
I seem to have found the scripts (sys_script_include) but I cant find the rules that call them.
-Rich

Business Rules are stored on the sys_script table.
sys_script_include is for Script Includes.

This is how I prefer looking at a table in the list view:
On a browser window https://<address of yourSN instance>/table_name_list.do
Paginates quicker and handy when the table's really big.

sys_script is the table where business rules are stored.
Pro tip: sys_script.list will open the list.
sys_script.LIST will open it in a new tab/window.

Related

Model with multiple tables

We run two websites, A and B. Each website has its own table, _a_ and _b_ which have exactly the same structure. Yes, I know it's silly, we'll be rewriting them over the course of this year and next.
Using Laravel I need to create a model that will hold both tables content. I don't need any kind of UPDATE or INSERT functionality, I just need to SELECT and use with to access other model information.
Is this possible with Laravel 4.1? I can individually model each table, but that would make it difficult in the future.
I was able to fix this by making using the Repository pattern and merging the results of each model into the get and all functions.

How to modify the filter criteria on a view of entity

I want to modify the view of 'Activity' entity, opened the view and try searching for edit filter criteria option and it's not available on view form.
please see below
Can you please help to advice me on how I can add filter criteria for this view above. Or how to make it visible the option 'Edit filter criteria' on the form of a view.
Any suggestion will be much appreciated. Welcome for any feedback...
I don't know any way to do that, but you can do your custom views and for example change the default view for that entity. With custom view you can change everything.
See here step by step: http://www.powerobjects.com/blog/2008/08/11/creating-and-editing-views/
What you want is impossible to achieve. Pedro's suggestion is your only option. Create your own Activity view, and then you can create your own filters. You definitely cannot create your own Associated Views. Public Views are the only ones you will have a hope of creating or modifying, and in this particular case, you are still restricted.
There are various places spread throughout CRM where you will run into problems like this, where an entity, view, or field is "locked down". This is the cost of starting with platforms like CRM which are a blackbox that only offer customization up to a certain point.
The problem in this specific case has to do with the nature of activities and the various activity types. Under the hood, there really is not a traditional record type for Activities. The Activity entity is really a "pointer entity" (note the internal name "activitypointer"). Activities really point to other entity types (in this case Activity Types) such as Email activities. The Email entity is more of a traditional entity which you can run standard queries against--but even still that is "locked down".
This additional layer of complexity makes dealing with Activities programmatically more difficult (ex. querying the data, modifying the data via a plugin/SQL, etc.) and, in this particular case, makes even the most basic customizations impossible.

How to process 1 form across 2 controllers/models in MVC (CFWheels)?

I'm an old CFML developer, new to CF on Wheels and MVC programming in general. I'm picking it up pretty quickly, but one thing that isn't evident to me is how one can offer a form to optionally update multiple db table records (models). I'd specifically like to set up a tabbed form for User info and User Profile info, where the former is required and the latter is not. This data is stored in two different one-to-one tables. What's the setup I need in order to call two "new" or "edit" views, run 2 "create" or "update" procedures, affecting two different tables. Or am I thinking about this all wrong.
Update: Adding some more info on what I'm trying to do. To keep it simple, I'll stick to 2 tabs and 2 tables, though I'm really looking at at least 3 in this instance.
So I've got a Users table and a UserProfiles table, and I've got models named User.cfc and UserProfile.cfc that are related 1-to-1, with UserProfile dependent on User. Pretty standard stuff. For each I've got controllers: Users.cfc and UserProfiles.cfc, each of those containing actions. add, edit, create, update, doing the obvious stuff (add and edit display forms). I have partials that display the add/edit form fields for each, so that's already prepared. Now, I want to create what is effectively a single add/edit form that can update both tables at the same time. The tabs don't really matter; effectively it could all be on one page.
So conceptually I'm doing something like:
#startFormTag(action=???)#
#includePartial("form_user_add-edit")#
#includePartial("form_userprofile_add-edit")#
<button type="submit" class="btn">#operation#</button>
#endFormTag()#
Do I need to create a separate controller action that basically combines the create and update actions for two different controllers?
Thanks in advance from a pleased and eager CFWheels newbie...
Brian
If all of the data is related through hasMany or hasOne associations, I'd recommend looking at nested properties.
http://cfwheels.org/docs/1-1/chapter/nested-properties
If you're a newbie though, you may want to refrain from this until you've got something simpler worked out.
I guess you are talking about two models representing these two tables, possibly associated using hasOne. Models allow you to validate data, this makes controller much simpler. This way you could create two forms under two tabs, and keep record's primary key as hidden field. Controller could run the validation and re-display the forms (partials may help)... Hold on, I am just going through the reference.
I realize this answer is pretty generic, as well as your question. I suggest you to go ahead and try something, see how it works.
After that update your question with code samples and ask if you have some specific problems. For example, validation and displaying errors in CFWheels may be a bit tricky.

Software or Service to Automatically Generate Custom Ordered Lists?

Disclaimer: I'm not a programmer, so this question is non-technical and probably very basic. I am just hoping to be pointed in the right direction...
I want to automate the routine process of compiling custom lists of medical questions by matching a question's attribute tags to the attributes of the patient and ailment. I've built an Access DB which generates lists when queried based on these tags. But I also need to set rules to determine the order the questions are returned in. Otherwise the questions are "out of order" and don't make sense.
Is there a better (and ideally browser based) software or service I could use to achieve such search/reporting functionality? Or does I need to find someone who can add this functionality to my access DB?
Thanks in advance!
It kind of depends on how you generate "lists when queried based on these tags".
If you're using sql to select from the database, then it may just be a matter of adding an "order by" to the end of your query:
eg:
Select question_no, question from some_table where patient = 'Freddy'
and tag = 'sick' order by question_no
Generally speaking, however you are retrieving these questions; the easiest way of ordering them is by one or more columns in the table you're storing the questions (or a related table)

Elegant UI for associations with a lot of data

I have an e-commerce website where it is necessary to make a number of associations e.g. a product needs a category, manufacturer, associated products, etc.
When there is only a fairly small, limited amount of data e.g. Manufacturer I simple use a drop down or option boxes for the user to pick the relevent field / fields.
However for items such as associated products, where I have thousands or products it is not viable to use one of these methods. At the moment I use a searchable / paged table that the user then clicks a button to add the association, this works, but it is pretty time consuming for the user and not what I would consider an ideal solution to the problem.
Has anyone implemented a solution to this problem or could they offer any advice as to how they would come at this from a UI standpoint?
Thanks for any help you can be
The solutions I can think of are:
Auto-complete
Recent associations
Smart associations
There may be more depending on exactly what you're doing, so feel free to add more details or screenshots and I'll think on it more.
Auto-complete
Using an auto-complete field would speed up the process for your users since they wouldn't have to hunt through the table for the association. Rather they could just start typing and have a suggest box appear below the field that allowed them to select what they're looking for.
If you matched your auto-complete on several key fields (i.e. manufacturer and product name), there's a pretty good chance that the user would be able to find the association quickly.
You could also code the suggestion box in such a way that it showed multiple pieces of key data. That way if the user wasn't quite sure what they were looking for, typing a few characters in the field would give them an idea of what they could search with.
Recent Associations
Below your auto-complete field, you could add the 5 to 10 most recent associations that had been made. That would allow your users to quickly add many products to the same association without having to use the auto-complete each time.
Smart Associations
Separate from the above two mechanisms, a smart association is something I first saw when theming a Shopify store. They allow you to automatically create associations based on the products key fields by defining conditions to include or exclude products:
Create Association 'Pants'
Where product title contains string 'pants' or
Where product title contains string 'capri'
The above is controlled by a set of dropdowns and textfields and got around the pain of manually creating associations.

Resources