Rally App SDK 2.0: Hardcoded data values for rallymultiobjectpicker - javascript

Is it possible to input hardcoded values for a rallymultiobjectpicker? I have tried using the same method as a rallycombobox, but it does not seem to work. Is the rallymultiobjectpicker limited to getting values from a modelType? Is there any way to get values from a field on a artifact? Or is it strictly for objects? I suppose the alternative would be to use a rallycombobox with the multiSelect set to "true". However, there are no physical checkboxes, and the text field can become very crowded if there are many options selected.

Using hardcoded values for rallymultiobjectpicker is not currently supported, but that option will be available in a future version of the SDK.

Related

HTML input dynamic filtering from PHP array variable?

I have a score entry page on a PHP-based website. It uses a DB query to retrieve the player’s Name & DB ID into a PHP array variable, then loops around the returned data to create an HTML <select> dropdown list.
This has now become too long… especially when entering on a mobile device (on iOS its even worse with that scroll wheel implementation they use - I dont even know what it looks like on Android!)
So I have a PHP array with the Name & ID fields in it.
I would like to convert this to filter a dynamic dropdown list as characters are typed in by the user.
I am novice at Javascript and it's nuances, though understand the principles of the language. The DOM model and other things I am also not very familiar with. I expect to use an onChange() function on the <input> textbox(?).
But how do I either tie that back to my existing PHP array variable? Or copy this variable “across” to the JS function?
I have changed the underlying DB to a NoSQL version (MongoDB). The bulk of tutorials, blogs, etc, for “AJAX Live Search” or equivalent seem to be centred around MySQL (which I previously used…)
The esiest approach would be usage of some js library, which can do what you need.
In my experience this should work for you: https://selectize.dev/
It combines select with text input, where text input is only used to seach in the select and hides unmatching records from it.

Save last state of radio buttons in a simple web app. Do I need a database?

I have a simple web page with three radio buttons that, once checked, thanks to onChange() function, the application does things.
Now, I need to save the last state of the three radio buttons. Basically, I need to know which was the latest checked radio button.
The application will be accessible from different browsers from only one person so, there aren't issue involving multiple people changing the status at the same time.
I've found this question here
Save state of radio buttons javascript
but, as soon as I need the data "in the cloud", I can't save it on memory browser or in local on the pc
Am I forced to use a database to store this only data or, am I missing something?
Maybe not the best solution but, an existing MySQL database works fine.
It can be also used an existing table used to store only static parameter. In this way, you can read the data easily using a SELECT as below
SELECT ParamName FROM Param WHERE id = 54
The data we need is saved under ParamName and it's identified by its unique ID 54 inside Param table
Use a serverside script (php,nodejs,python etc) to write to a json file. And use xhr (ajax) call to call the serverside script.
Or use a simple nosql database.

Retrieve multi selected value using Get and Javascript

I'm trying to read in values from a multi-select via get and javascript.
Here's an example of the string and values i'm trying to retrieve:
?q=y&deg[]=Graduate+Certificate&deg[]=Graduate+Degree
My code works with URLSearchParams in all browsers except late MS IE and early MS EDGE browsers.
Can someone suggest a way to read two separate values for deg[] without using a polyfill library?

How do I use the dojo constraints object to customize the text input field for an IP address in my dojo TextBox or NumberTextBox

How do I use the constraints object to customize the text input field for an IP address in my dojo TextBox or NumberTextBox. Or is there another object I should be using to do this where the user has to type a IP address correctly.
I simply want to create a input field for users to input an IP address which requires something like this: pattern:'min:1,max255.min:0,max255.min:0,max255.min:0,max255'
I believe my current problem is that I'm trying to use the NumberTextBox and it has constraints that are overriding my constraints.
I would really like to know what all constraint options I have available but the documentation on dojo constraints I found was deprecated and the link replaced pointed to DateTimeBox. :|
Here is a snippet of my code:
cellWidget.outProActFeedsDestAddr.set('constraints', {pattern:'min:1,max255.min:0,max255.min:0,max255.min:0,max255'});
While IP addresses are numeric in a sense, NumberTextBox is really intended for typical single numeric values, so that's not really an option here. You've potentially got a couple of choices:
Use ValidationTextBox and give it an appropriate regExp (note that Dijit expects a string for this property, and applies ^ and $ around it itself), or a validator function (there is a dojox/validate/regexp.ipAddress that you could potentially play with)
Write a form widget that combines 4 NumberTextBox instances into one value (I'm not sure whether the grid would throw a wrench into the works with regard to tab stops with this approach)

Accessing the text value of custom column with NetSuite SuiteScript

I am working with NetSuite's server-side SuiteScript and need to access the display value of several custom Transaction Column Fields. The fields in question are each set up as type "List/Record" and are associated with existing Custom Lists.
Working in the NetSuite Script Debugger, I have inspected the values returned from nlapiLoadRecord('salesorder', orderInternalId). Looking at the Items in the resulting object (e.g. obj.sublists.item.line 1) I see that some of these List/Record custom fields provide both a number (the ID of the selected List entry) and a string (the displayed text value of the List entry), but other custom fields do not.
For example, I have two custom fields with IDs custcol1 and custcol2. These are both of type "List/Record". When the sales order is loaded, nlapiLoadRecord provides the fields "custcol1" (number) and "custcol1_display" (string) for custcol1, but only "custcol2" (number) for custcol2. I do not see any difference in the settings for these two custom fields, so it is unclear why one provides the string and the other does not.
I need to retrieve the string values for both fields. Is there a setting change I need to make so custcol2 will automatically return a "custcol2_display" value? Or is there another API call I can use to take the number value from "custcol2" and look up the associated string value in the underlying Custom List?
Try using record.getLineItemText('item', 'custcol2', linenum)
For debugging, I tend to use Firebug - it's a lot more effective than the NS debugger and quicker than logging statements for just testing things out.
I just noticed this is two years old, but I think you can put columnname.id to get the data value. It works for standard columns but not sure about custom ones.
One thing I have learned to use is the NetSuite debugger, I don't use it like a standard debugger but rather like the javascript console. Just paste in some code into the box and then debug it, it is great for seeing what the dang property values are and the data in them which seems to be a crapshoot in NetSuite.

Categories