End user can add another field to form - ServiceNow - servicenow

I am new to ServiceNow and working on setting up a form. In the form, I am asking the end user for other individuals within the organization that might be related to the project and what they are doing for the project. I want to do this with two fields side-by-side -- the one on the left referencing the users table and the one on the right as a text field they can fill in.
Because I do not know how many users they may want to add, I was hoping to set it up with a + or "Add More" option of sorts that would add more rows with that format. I'm looking for advice on best ways to accomplish something like that, if it is even possible.

Related

Dynamic content display

when I select (say customer) using Dropdown I would want to show users all the properties on a side table or division. Essentially, displaying the selected customer's fields on the same page for the users to verify/read.
I am using laravel-backpack for development and finding it difficult to implement. Any help is greatly appreciated.
I'm afraid there's no existing way to achieve that, you'd have to code it.
But you don't have to start from scratch, you can use the code for the select2 field (or whatever field you prefer) and create a new field type, say select2_and_preview by tweaking the Javascript inside that one file.
There's recently been a Feature Request for a similar feature (see here), you might want to pitch in with your opinion if you want it created by the team, and included in the official build.

Composite Fields In MSCRM 2013

I have a question on the subject of composite attributes that I would be grateful if you could help me with.
I posted this before on other question blogs but got no response I am satisfied with.
I am writing JavaScript that will update the fields (i.e. address1_line1, address1_line2, address1_line3, address1_city, address1_stateorprovince, address1_postalcode, address1_country) in the composite (address1_composite). When the fields are updated the composite does not seem to update. I have to open the composite and close it again. Is there a way of doing this automatically in JavaScript?
I have tried the following ideas:
Idea 1:
Xrm.Page.data.entity.save();
This is recomended at http://community.dynamics.com/crm/b/magnetismsolutionscrmblog/archive/2013/10/22/working-with-dynamics-crm-2013-composite-fields-fly-out-menu.aspx
This is not any good as my customers want to view the composite before saving the page. Also I would not want to save the page for my customers as they do not want this. They would like to decide when to do this themselves.
Idea 2:
Xrm.Page.data.refresh();
This is not really what I wanted as I do not want to refresh the whole page. I just want to refresh the composite. Also it bring up a popup that warns you about not having saved the page which will be annoying for my customers.
Idea 3:
Writing the address from the address lines to the composite.
This feels like a nasty hack.
There is probably more than one way of doing this. I used the function
Xrm.Page.getAttribute("address1_composite")._attribute.setValueForCompositeField();
I do not like this for the following reasons:
This is a hack as it is not using the system functionality of the done button to write the data.
You do not get the system formatting you get with the done button although this will get done when the form is saved so it is not so bad.
In the future if customers are allowed to add their own composite fields it could cause problems as the field names could be different.
It requires me to write extra code for each form that has a composite which has fields with different schema names. E.g. I have to write different code for forms with ShipTo and BillTo addresses as the code for the account form will not work.
Another idea was to set the focus to the composite field after a change has been made to any of the fields inside the composite.
Xrm.Page.data.entity.attributes.get("address1_composite").controls.get(0).setFocus();
This is the best idea so for but it is far from perfect. This forces the user to press the done button and hence the fields will be written. I was hoping for something more automated.
My Question:
What would be great is if there was a way to click the composite done button in JavaScript. This would give me the formatting of the done button and the automation I need.
Update - 14/04/2014
Since posting this question I have been in contact with Microsoft and they say there is no supported way of clicking the done button via a program.
If the field is locked down CRM JavaScript does not send the data back to the server for updating. Another approach would be:
perform the update using JavaScript (so the user sees the change); and
use a server side plugin on the Update event so the value is persisted.

How to insert multiple rows into embedded view from a subform? Lotus Notes

I have a section that contains a subform ( containing 3 editable fields for the user ).
Then I have an embedded view categorized having two actions: Add and Trash.
What i want to do: After the user complete the 3 fields and then press Add, the first row in the embedded view will appear. ( This easy thing I did ). But then after the first click on Add, I want that all the 3 fields to be refreshed, all of them to have as their value: "".
After, if the user wants to add another row into the embedded view (with different values), in my case it is overwrited on the 1st row. I want to be separate rows in order.
I tried something with #Command(ViewRefreshFields) into the Add action code but I didn't make it to work. Please help, J. U.
Jazir, I'm guessing that you also go by the names "Florin G Mihalache", "Josh Mitchell" and "Yveniss Ltoreau", and I've been following the development of your application along with many other professional Notes developers.
I really think you need to go back to the very first basics, and work out the difference between forms, subforms, documents, views, embedded views, and other important components of Lotus Notes databases.
I strongly suspect that for a couple of weeks you have been trying to use a form to create other documents, via a subform, to be displayed in an embedded view in that form, when what you should be using is just a view, and documents. Perhaps you might need to use pages, outlines and framesets. It is very important that you understand these basic concepts before confusing the people who have tried to help you, to whom you may have lied.
I have voted your question down, not just because you have shown a lack of research, but because you appear to keep switching ID when people lose patience with you. I will undo that vote if I become convinced that you are not Florin.
The documents displayed in an embedded view are controlled by the view's selection formula. You haven't shown that. You haven't shown your code in the Add button. You haven't shown what properties you have set on the embedded view -- e.g., show single category. So you're not giving us quite enough info to diagnose your problem and help you.
But in general, I think that if you want to control the order of insertion of individual documents into an embedded list, perhaps using an embedded folder would be a better idea than an embedded view.

how can I set up a form with dynamic fields according to user input?

I set up a simple form with Chronoform V4. One of the field need to be kinda dynamic.
for example,
do you know your id, if yes, then input id.
if not, then there are other filelds need to be filled, such as name, birthday, sex etc.
but if you know the id, those fields should be grey out or something etc.
How can I do this in joomla? Many thank
Your best bet? Hop on the forums over at www.chronoengine.com - not only are the developers super friendly, I have seen them custom code stuff for their users more times than not.
They know the stuff best and will definitely be able to help you.
That said, there are ways to add custom code snippets to chronoforms - I recommended using javascript to accomplish your goal. I have done something similar and chronoforms + javascript = wonderful result.
If you've created your form with their wizard, go into your forms and click Wizard Edit.
From there on the right hand side you should see an 'Events' tab - click that.
In the 'On Load' event, you'll want to add 'Load JS' from the menu on the left. Then you can open that, and add your javascript to control your choices. The javascript will load when the form does and you can control the user selections exactly how you're requesting.

help needed regarding a suitable GUI control in struts

hey all..
i want the user to enter a set of data such as "name" and "age" and correspondingly send it to the person bean. But the user can choose to enter any number of person's data at 1 go.
What control at GUI would be suitable for achieving this (keeping in mind i am developing the application in stuts2).
Thanks;!
There isn't going to be anything definitive. Just hand roll the solution with your favorite JS library. Adding struts2-json-plugin will probably help.
I had created something very much like what you are looking for... It was a two column table where you typed in a user name into one field, hit tab, then typed in the second field. There was one button at the end of the table, so hitting tab once more and enter added the current fields to the DB and added a new row to the table and positioned the input into the first field. It allowed for smooth data entry.

Resources