I have a field in a Database that is set as a varchar(1), and it is bound to a non editable textbox in acumatica. I would like it so that when the value of the field is equal to 'A', the value displayed in the textbox in Acumatica is something longer such as 'Apple'. The user will not be editing the textbox so I do not need this to work in reverse.
From my research, I see that LabelListAttribute might be the attribute I am looking for. Can anyone give me an example on how one creates a new 'LabelProviderType' or 'LabelValuePair' to feed into this attribute.
Additionally, am I just better off in copying the combobox example from the T100 class (Page 76) and disabling it? I would rather this work within a textbox
Thanks
For the use case you are describing you should indeed use a PXDropDown control bounded to a DAC field decorated with PXStringList attribute as described in T100 Configuring a Combo Box example.
Related
I'm a traditional domino developer just beginning XPages. I'm working on modifying the standard 8.5.3 Domino discussion database. I've added some fields on the Main Topic and response forms, one called category. I've added a categorised column in the ($xpAllDocuments) view to the left of "Topic" for the category field. This works fine in Notes as you'd expect, but when the view is rendered in the All Documents xpage, the category twiste displays without any label. I'm not sure how to modify the column data for the xpage, as it seems to use a repeat? instead of a view?
Any help greatly appreciated, and apologies for the presumably basic enquiry!
You have to add the categories column to custom control allDocumentsView which renders the view for browser.
How to find out where to set the new categorized column? A good way is to look at the "All properties" of a certain element. For that, open the Source pane of custom control allDocumentsView, position cursor on <xe:dataView and look at "All Properties". If you hover over the properties' labels you get a helper window with a short explanation.
In your case, property categoryColumn is what you are looking for. Assuming you added a categorized column Categories to view ($xpAllDocuments) then you would have to put into property categoryColumn:
With that, your source code gets expanded by
<xe:this.categoryColumn>
<xe:viewCategoryColumn
columnName="Categories"
columnTitle="Categories">
</xe:viewCategoryColumn>
</xe:this.categoryColumn>
and you will see the added categorized column in your rendered XPage.
I don't know the discussion template in detail, but when the All Documents Xpage is using a repeat control, then you cannot expect an automatic category expand/collapse feature as in a Notes view.
If you want that, you need a View control on the Xpage.
Using a viewPanel, how can we display a reponse entry the way it is displayed in the Notes client? Or in other words: is there a way to build some kind of colspan for specific columns based on the current entry's document type?
I made some code a while back to make the categorized views behave more like Notes:
http://dontpanic82.blogspot.no/2010/10/xpages-make-categorized-views-behave.html
Here's another solution from Stephan Wissel:
http://www.wissel.net/blog/d6plinks/SHWL-86V67E
I have a custom view of a list that doesn't include the "Title" field, I need to associate the display from with another spfield, how do I go about this?
Thanks
Achieved by setting the LinkToItemAllowed and ListItemMenuAllowed properties of the spfield to SPField.ListItemMenuState.Required;
Although not the nicest but a simple SPD workflow that populates a custom column of type Hyperlink/Picture with the DisplayForm URL. And then you can display this column into your respective view.
However, what's the reason you want to do this? You don't have the value in title? You can use the Title(linked to item) instead of Title(linked to Edit Menu). You may want to verify the names though as what I have put in terms of paranthesis might not be exact.
I have modified the NewForm.aspx page for a SharePoint list, and am changing the visibility of certain div's based on the value of radio input buttons. I'd like these values to be passed to a list field as well. I have a couple of questions regarding this:
1) How can I pass the Yes/No value from the radio input to a SharePoint list field?
2) Can I drop a Yes/No field from the list on the form and use that to control the visibility of my div's?
Thanks.
Since you're already using JavaScript, on your NewForm.aspx you could probably use SPUtility.js; full disclosure, this is an open source library I maintain.
Both of the options you mention are possible. I haven't added support for Yes/No fields (as of v0.3) but you could probably do something like this.
Create a single line of text field (will hold your value in the list). Lets call it "Text Field".
Based on our radio button input, call SPUtility to set the field's value:
SPUtility.GetSPField('Text Field').SetValue('Hello world!');
You could also probably hide "Text Field" so they can't see the value change.
Or... if you wanted to go with option #2, you could help me add support for Yes/No fields. :)
Hopefully this helps.
You can use our Smart List Pro product to modify your list form. We have various capabilities, such as showing/hiding fields depending on values of other fields and user identity, tabbed interface and much much more.
When we will use DrawItem for a listbox?
Normally, if the listbox is ownerdraw, we will use DrawItem. What are the other senarios we use drawitem?
To elaborate on Rashmi Pandit; A ListBox with override DrawItem can also be used to 'visualize' objects. In a project I'm working on, a ListBox is used to display rows from a database. Each row / item is visualized using formatted Strings, Icons etc.
Overriding DrawItem (and MeasureItem!) is ideal for this purpose. Of course, the internal structure has to be tweaked a bit (the standard Items property cannot be used for objects), but it is certainly worthwhile.
Message WM_DRAWITEM is sent only to owner-drawn List boxes.
You can use DrawItem when you want to override the default implementation and custom the way a listbox is drawn. For e.g. in the list there might be some item which should is the default item and you would want it to be highlighted so that the user knows it is the default item.
Here's an eg for a combo in C#: Higlighting a particular item in a combo box