I have a view that has a column to make it sortable.
When clicking on the column header the view will be sorted ascending /descending.
How can I get a handle to this sorting in SSJS , I mean how can I sort it using SSJS ?
If you define a view as a data source there are 2 properties.
sortColumn - column to sort by
sortOrder - which order to sort by
You could compute these with scoped variables and refresh, that should do it
Related
I have a SharePoint List (say "List-A") with plenty of columns, some of which are lookup columns.
These are just used to construct a choice columns, where the items in the choice drop down are the items of a column in a different List ("List-B").
I have used the function on SharePoint to integrate List-A with Power Apps Form. This creates a Power Apps form that is readily available.
For the Lookup choice columns, I have added List-B as the data source, and am using the items from the correct column as items in the choice that is linked to the lookup column. This correctly populates the drop down menu as expected.
Now when I publish this form and fill it from sharepoint (it pops up as it should hafter clicking New in the List view) I can fill the entire form and submit with no issue. However all the lookup columns remain blank, as if the form returned a null value instead of the selected.
I have both datasources set up:
The update property of the datacard connecting to the SharePoint List is equal to the Selected of the datacard containing the combobox (combobox is called DataCardValue43).
The items property of the combobox is equal to the correct column of List-B.
As an alternative solution, I have attempted to make a different column that is just one line of text. For this column, I have made a combobox once again setting the items property to the column in List-B. The intention was to return the selected value as a string. It was attempted thus:
where combobox1 once again manages to give the correct options in the drop down box but returns only Null.
To study it further, I have made a power apps flow that takes Create New Sharepoint List object as input. Here I see that the values are indeed Null
The one called "Return" is the text column that I made, and the other being the lookup column. I do notice that the Lookup column isn't called Value, but id. I don't know what to do with that information though.
I really just want to have a column in my power apps form that lets you choose and the choices are values from a column in a different List. What do I do, and why doesn't what I've already done work?
Thank you.
Please follow the steps below to solve the issue.
1: Add a Lookup column in SharePoint List.
2: Open that list in Power Apps by using the Customise Forms Option From SharePoint.
3: The Item property of Lookup field will be by default as follow:
Choices([#'CustomisingSharePointList'].LookupColumnListName)
4: There is no need to change/delete the lookup field with any custom dropdown or combo box. This is the point, where you are doing mistake by adding a custom combobox and replacing the original Lookup dropdown. If you want to change datasource, apply filter or sort the data, you can do all these thing to the same original lookup column.
e.g I have applied filter and sort functions to the existing data:
Sort(Filter(Choices([#'CustomisingSharePointList'].'LookupColumnListName'), Value in Filter(LookupColumnListDataSoure,Progress.Value = "Open").ID),Id)
5: When you will publish the list, it will work fine.
Note:
CustomisingSharePointList: List in which we have added a lookup column.
LookupColumnListName: List to which the lookup column actually belongs to.
LookupColumnListDataSoure: You need to add the original list as data source in power apps to use the above filter. This step is optional and applicable only if you apply filter like I did in step 4
I have a rich data table which i want to filter based on date selected above data table. I have written<rich:column filterType="custom" filterExpression="#{fn:filterBaseOnExpiryType(resultValue.endDate);}"> and I have tried adding filterMethod="#{bean.filterMethod}" still when data table displays rows it is not invoking filter method which is binded in bean. Is there any other work around to invoke filter with that current record date as input parameter
using this tutorial ( altough, I did some minor changes ): http://www-10.lotus.com/ldd/ddwiki.nsf/dx/XPagesViewControlAddFullTextSearch.htm .
My search is OK, and also, the search results are displayed correctly for a plat view ( uncategorized ).
I would like to display my search results ( docs. ) inside a categorzied + sorted ( ascending ) viewPanel which lists some docs. having 2 formName = rowData.getDocument().getItemValueString("Form"); different values.
Indeed, the search is working fine, but when I display the results into my viewPanel, the first column ( which is categorized and sorted ascending ) is missing ... and so the link between the resulted docs ( these docs. are linked by a common field ) is gone.
How can I resolve this issue?
My guess is that there are some certain rows which don't represent a Document ( these docs. are represented by the 1st column categorized ) ... and because of it, the FTsearch don't display those specific rows.
Thanks for your time!
As in normal categorized views in the Notes client, search results won't be displayed with categories. As the view control uses the same data and collection as source the same behavior will be used in Xpages views.
Basically you have to roll your own and then use a repeat or data table. Do your full text search in code (Java or SSJS) and then loop through the results and build an array list of objects. Each object could hold what you want to display in the columns.
Howard
The XPages JDBC application uses the derby1 connection and the examples show being able to sort the columns in ascending/descending order. The design elements show the column headings with sortable="true" which is what I have in my app, but my columns won't sort. You can see a table structure using the Table Meta Data listing, but that doesn't say if the data element is indexed. Our DBA says that the index doesn't allow/disallow sorting and that I have to use the order by.
So, how is sorting being accomplished in this application when there is no event tied to the columnheader?
Your dba is right, you can order by a unindexed column (use ORDER BY YourColumnName in your SQL statement). Both datasources (JdbcRowSet and JdbcQuery) allow you to specify sqlQuery parameter, which can contain this clause. Unfortunately you cannot use sqlParameters properties for sorting (this is probably because java.sql.PreparedStatement does not allow you specify an ORDER BY parameter).
On SSJS side, you can use #JdbcDbColumn() function, which allows orderBy as fifth parameter, or use your own SQL statement with #JdbcExecuteQuery.
The StringMapBase SQL table is the table that holds Option List values that have been added to an entity. When using an Advanced Find in CRM 2011, if you select a pick list column (Option List) value from an entity to be added to the resultset, the Advanced Find mechanism somehow auto-wires in the string value of the pick list from the StringMapBase table instead of showing the StringMapBase's Primary Key value that's actually stored on the record.
I'm in the process of creating SSRS reports that hinge on some Option List values:
// SQL psuedocode
Select...
...
Where Value = 'Some String Value of Interest'
However, I very much dislike the fact that, so far, it looks like I basically have to write in some ad-hoc SQL in order to get the applicable StringMapBase value. In order to do so, I have to hard-code some magic values, which I despise.
Does anyone know by what mechanism the CRM Advanced Find engine auto-wires these values in? Or does it simply do its own join to the StringMap system view or use a SPROC somewhere?
When you use the Filtered views (the only supported way to read data in your report) there will be an additional "logical" column for Bit, Picklist, and Lookup columns. For an attribute named "new_option" you should be able to add "name" to the end of the column name and query "new_optionname".
select new_option, -- Integer
new_optionname -- StringMap joins generated by Filtered Views
from Filterednew_test