Allow an end user to populate a field along with the selection fields - sap-query

I would like to add 1 input filed into the Infoset/Query in SAP.
Basically I'd like to have 1 field (integer) end user can populate alongside the selection fields. How to do so?

You can add additional input fields in the Infoset edit dialog. Click on button "Extras" and then tab "Selections". You can add additional selection parameters there.
In tab "Extras" you can also add additional fields for your infoset output and add some abap logic to each field. The logic is processed in the order the fields are listed, you can change the order with the field "Sequence" in the field details. You can also add whole tables and structures in that tab.

Related

How do I change the selected item label in a Dataverse Form lookup?

In a dataverse table I use autonumber as the primary name column. When I add existing rows (n:n relation) using a subgrid, a search pane is displayed on the right side of the screen. The quicklist shows up correctly, but it doesn't make sense displaying in the list of selected items.
How/where do I change this?
Typically the grid/list/card will show the first three fields of lookup view designed for that entity while searching/associating. You have that luxury to rearrange the fields to display including name, auto number and other fields.
Lookup display field is designed to show the Name field of that entity record by default (only choice). Since you are using auto number type for that Name field, it’s showing only auto number - this is expected.
Normally we will have a separate auto number field and concatenate few fields along with auto number to the Name field to make sense. But you chose the other way.

Rails: disable input tag upon selection from a dropdown menu

Scenario/Context
I've got a drop down menu with two input elements underneath.
From the dropdown menu, are names of companies (with values set to the respective company id's), and another prompt to Add a new company.
If the option to Add a new company is selected from the dropdown, then the user is to fill out the 2 input field elements (i.e. company name and company email).
Otherwise, if an available company is selected from the dropdown,
then the 2 input fields (for company name and email are to be disabled).
My question
Is this possible to do without an AJAX call if I want things to happen without a page refresh?
Can anyone suggest some other alternatives??
Many thanks!
That is absolutely possible, though you'd need to use some JavaScript to make it happen and load a bit more data to the DOM on the initial page load.
For each option in your company select dropdown, add a data attribute for the name and email.
Then, watch that dropdown for the change event in JavaScript. Whenever that event is fired, if the data-company-name and data-company-email attributes are defined for the selected option, disable the input fields and populate them with those values. If those data attributes are not defined for the option (likely only for your 'Add a new company' option), then clear the values from the input fields and enable them.

How do I link two fields to the same table in ServiceNow?

Forgive my ignorance for the proper terminology, but let me try to explain what I want to happen.
I have two custom fields on the incident table/form. I have created a custom table with 2 columns. I have figured out how to reference the table in one of the fields, allowing me to search the entries. Now I want to link the field selection to the other field via the custom table I made. When I make a selection in field A, I want field B to populate with the other column on the same row Field A pulled from in the first place. How would I do that?
Sounds like you want what's commonly referred to as a "derived field" or a dot-walked field.
You have a reference field which stores the reference to the other table, and want a second field on the form that shows another field on that referenced table. You don't actually need to create a new element, you just need to add a dot-walked form element.
Once you have the reference field added, go to Personalize/Configure the form layout.
In the slushbucket of available fields, you'll notice that reference
fields show up in green text with a little [+] next to them.
Select your reference field and a little button will show up between the two
lists, just above the "Add" button
Click that button and the left-side available fields will show the fields available on that reference field's table.
From here, select that second field that you want to display on your form, and bring it over to the right side where you want it.

Xpages valuePicker add value

Is there a way to add a field into the valuePicker with the possibility of adding new values in it? The valuePicker get's the values from a view, and I wouldn't want to add another addButton to add some values withing that view, in separate way. I would like a dialogBox like the valuePicker + the option to add new documents withing it. It is possible?
That functionality isn't available in the Value Picker. It's unlikely to be added, because of the variety of dataProviders, which makes it difficult to know where to add the option to make it available to other documents, and also ensure validation of options.
Typeahead on an Edit Box control allows you to add entries not in the list.
Alternatively, you can add a separate Edit Box to your XPage to include a value not in the list. But if you want to store the new option in the same field, you'll need to write the code to add the option to the source of the list. E.g. if it's the dataProvider of your Value Picker is a dominoViewValuePicker, you'll need to create a document in that view as well; if it's a simpleValuePicker, you'll need to compute the options so they also look to this field. Otherwise, when the user edits the document again, the option will not be available in the list, so may get removed.
Why do you want the user to insert new values into a field in valuePicker? Instead, let the user add the new value direct into the field which is the valuePicker related to.

How can an ExtraColumn type property be used in a Custom Control in XPages?

When defining the properties of a custom control in the "Property Definition" section, you can choose as "Type" in the "Property" tab the option of "extraColumn" and "iconColumn".
How should this type be used ?
Both iconColumn and extraColumn relate to the corresponding tags of the dataView control. You would typically use these when your custom control contains a dataView and you wish to allow an outside control to pass in details about the columns to be used in the dataView.
When a data view is used in a standard XPage, the extraColumns appear as actual columns. The summaryColumn is the first column and shows as a link.
However, in a mobile application, extra columns show up as additional lines of data in the mobile data row. The summaryColumn value shows as "header" in the data row, while the extraColumn values show underneath that value.
<xe:dataView id="dataView1" pageName="#contactDetails" collapsibleDetail="true">
<xe:this.data>
<xp:dominoView var="view1" viewName="TeamDirectoryNameLU">
</xp:dominoView>
</xe:this.data>
<xe:this.summaryColumn>
<xe:viewSummaryColumn columnName="Name"></xe:viewSummaryColumn>
</xe:this.summaryColumn>
<xe:this.extraColumns>
<xe:viewExtraColumn columnName="Office" style="font-size:12pt"></xe:viewExtraColumn>
<xe:viewExtraColumn columnName="OfficePhone" style="font-size:12pt"></xe:viewExtraColumn>
<xe:viewExtraColumn columnName="Email" style="font-size:12pt"></xe:viewExtraColumn>
</xe:this.extraColumns>
</xe:dataView>
One row of that might display as:
Ian Kennedy
London Office
44-22-830-6000
ian.kennedy#company.co.uk

Resources