XPage - fileDownload column order - xpages

Standard column order of a fileDownload list is | Type | Size | Name | ... |
How to change the order to | Name | Size |  Type | ... | ?

You can't change the fileDownload column order with out of the box properties.
You could
reorder columns of rendered HTML <table> with client side JavaScript or
create your own download table with a repeat control for example.
But, I am not sure if that's worth the effort...

Related

Lotus Notes Designer - Show dialog list based on value from another field

When creating a new program in Lotus Domino Designer, I thought of trying to create a dialog list (Process) which shows different list based on value of another field (Assy).
Example:
-------------
| Assy |
-------------
| Frame |
| Armature |
-------------
If Assy = Frame
----------------
| Process |
----------------
| Frame Insert |
| Adhesive |
| Vacuum |
| Magnetize |
----------------
If Assy = Armature
----------------------
| Process |
----------------------
| Commutator Insert |
| Winding |
----------------------
For the Assy field I tried using this formula:
#If(Assy="Frame";"Frame Insert":"Adhesive":
"Vacuum":"Magnetize & Appearance";Assy="Armature";
"Commutator Insert":"Winding";"")
During testing I noticed 2 things:
When I choose Frame in Assy field, the Process field will give me the correct dialog list. But when I switch Assy field to Armature and check back on Process field, the choices still remains as Frame selection. The same applies for when I choose Armature first.
When I commit to a selection in the Process field, both data in Assy and Process field disappears. Then when I try to reenter the information the Process field won't show any of my selections even after picking new Assy.
What seems to be the problem here? Do I need to make any changes in options or is my code faulty?
First of all: You need to set the setting "Refresh Choices on Document refresh" in the "Process" Field (same Tab as the Formula) and the setting "Refresh fields on keyword change" in the Assy- field.
I usually do this with another field "ProcessList", computed (or computed for display), that is above the Process- field and under the "Assy" field and contains the formula you posted above.
Then in the process field the formula is simply "ProcessList".
In normal use the "ProcessList" field is hidden.
This has the advantage that you can "debug" better by removing the hide when of the ProcessList- field and check the values directly.

PowerPivot One to Many Value

I have two tables.
An Issue table
+----+-------+
| ID | Name |
+----+-------+
| 1 | task1 |
| 2 | task2 |
| 3 | task3 |
+----+-------+
And table that extends issue by custom fields
+----+---------+------------+------------+
| ID | issueId | customName | val |
+----+---------+------------+------------+
| 1 | 1 | age | 22 |
| 2 | 1 | speed | 56kmph |
| 3 | 1 | startDate | 03.03.2015 |
+----+---------+------------+------------+
Problem in PowerPivot is that, when I select Issue as a Row, customField as Columns and val as a Value at place of Value Excel automatically aggregate using "Count of Value" which shows fields count, and for speed, startDate etc. excel shows "1", not the propper val of it.
Is it possible to force powerPivot to show value by its column name?
If you don't mind using Power Query, you can get to this fairly easily:
Here's how:
1. Add your tables as sources in Power Query. In Excel 2016, you can do that by clicking on a table, then on Data -> From Table. This will open Power Query with your selected table loaded. The table will be listed under Queries, on the left side of the screen.
Once you've loaded your first table as a source. Probably the simplest way to add the next one (by way of explanation anyhow) is to click File -> Close and Load, and do what you did previously, this time for the second source.
(When you Close and Load, a new tab will be created in your workbook, with the results of the new Query...which right now would just look like a duplicate of your original source table.)
2. Merge (join) your two queries.
a. Click on your Issues query, in the queries list on the left side of your screen. That will open the Issues query.
b. Click Home -> Merge Queries (drop-down) -> Merge Queries as New.
c. Fill in the dialog window like below and click OK. Make sure to select the columns you want to match on--highlighted in green here. This will create a new query, most likely named Merge. (Of course, you would use the names of your tables, instead of Issues and Extended.)
Your new query will look something like this:
d. Click on the button to expand the tables in the column of tables and make selections, like these, from the drop-down window and click OK.
You'll get a table something like this:
3. Pivot your customName column.
a. You can't pivot a column with nulls, so select the customName column, then Transform -> Replace Values, and enter these settings in the dialog window that pops up, then click OK (the Replace With box is left empty):
b. Select the customName column then Transform -> Pivot Column. Fill in the dialog window that pops up like this, below, and click OK.
4. Clean up. Select all the columns you want to keep, then click Home -> Remove Columns (drop-down) -> Remove Other Columns:
You'll end up with something like this:
When you Close and Load, you'll get a new tab with the final table in it.

Recreating a non-straightforward Excel 'vlookup'

I'm looking for some thoughts on how you might recreate a 'vlookup' that I currently do in excel.
I have two tables: Data contains a list of datetime values; DateConverter; contains a list of calendar dates and their associated "network dates." Imagine for a business - not every day is a workday, so if I want to calculate differences in dates, I'm most interested in the number of work days that elapsed between my two dates.
Here is what the data might look like:
Data Table DateConverter Table
================= ===================
| Datetime | | Calendar date | Netowrk date |
| ------------- | | ------------- | ------------ |
| 6-1-15 8:00a | | 6-1-15 | 1000 |
| 6-2-15 1:00p | | 6-2-15 | 1001 |
| 6-3-15 7:00a | | 6-3-15 | 1002 |
| 6-10-15 3:00p | | 6-4-15 | 1003 |
| 6-15-15 1:00p | | 6-5-15 | 1004 |
| 6-12-15 2:00a | | 6-8-15 | 1005 | // Skips the weekend
| ... | | ... | ... |
In excel, I can easily map in the network date for each date in the Datetime field with a variant of vlookup:
// Assume that Datetime values are in Column A, Calendar date values in
// Column C, Network date values in Column D - this formula fills Column B
// Headers are in row 1 - first values are in row 2
B2=OFFSET($D$1,COUNTIFS($C:$C,"<"&A2),)
The formula counts the dates that are less than the lookup value (using countifs because the values in the search array are dates, and the search value is datetime) and returns the associate network date.
Is there a way to do this in Tableau? Will it require a calculated field or can I do this with some kind of join?
Thanks in advance for the help! Let me know if there is anything I can clarify. Thanks!
If the tables are on the same data server, you have the option to use joins, which is usually the most efficient way to combine information from different tables. If the tables are on different servers or platforms, then you can't use a single query to join them.
In either case, you can use Tableau data blending, which is sort of like a client-side join of aggregated results from multiple queries. Its a pretty useful technique, but a little more complex and restricted and also usually less efficient than a server side join.
So if you have the option to have both tables on the same server, start with that. It will be simpler and likely faster.
Note if you are going to use a date as a join key, you probably want to define it is a date and not a datetime.
#alex-blakemore's response would normally be adequate, but if you can change the schema, you could simply add the network date to the DataTable. The hourly granularity should not cause excessive growth and you don't need to navigate the joining.
Then, instead of counting rows and requiring a sorted table, simply subtract the Network date from each other and add 1.

Can Behat tables be used to check multiple text labels

Using Behat with mink and Drupal extensions.
I essentually have a page with multiple labels and I want to confirm the text of them all. I want to do this without having to enter something like.
Then I should see "Filter"
Is there a way to check all the text im expecting using Pystrings or Tables in a similar way they can be used to populate text fields:
And I fill in "Options" with:
Just thought it maybe easier to check it all at once rather than having to provide multiple steps
=====
Update:
After being provided some direction from dblack I used the following inside its own feature to test all labels that fall on the same page:
Note: I use the mink and UIBusinessSelector extensions
Also the 'login' is a custom function
Background: All scenarios require an admin login, then create a filter then confirm page labels
Given I login as an admin
When I go to the page "Product Filter"
And I click the "Add Filter Button"
Scenario Outline: Verifying page text
Then I should see "<ThisText>"
Examples:
| ThisText |
| Filter by SKUs |
| Filter by Package Name |
| Filter by Campaign Medium |
| Filter by Product Category |
| Filter by Product Selection |
| Filter by Product Holiday Experience |
| Filter by Product Star Rating |
| Filter by Product Destination |
| Filter by Product Duration |
| Filter by Product Supplier |
| Filter by Air Ex Point |
| Filter by Land Ex Point |
| Filter by Product departure |
| Filter by Ship name |
| Filter by Cruise Line |
| Remove $0 products |
| Human readable name |
If you want to use a table to check each of your labels, you could use scenario outlines.
Scenario Outline: Check labels
Given I am logged on as "someuser"
When I go to the homepage
Then I should see "<mylabel>"
Examples:
| mylabel |
| Filter |
| Some Other Label |
| Another Label |
The drawback is that scenario outlines are templates, where the scenario outline is run once for each of the examples provided - for your example, you just want to know all the labels are on the page so you don't really want to make a log in and request for each label.
If i wanted to ensure a page contained all the labels it was supposed to, I would just do this (the scenario would be run just once):
Scenario: Check labels
Given I am logged on as "someuser"
When I go to the homepage
And I should see "Filter"
And I should see "Some Other Label"
And I should see "Another Label"

Combining Columns in a Lotus Notes View

Is there an equivalent of GROUP BY statement in a Lotus Notes view?
Currently my table is laid out like this:
| JOB # | SHIP DATE 1 | MODULE 1 | SHIP DATE 2 | MODULE 2 |
| 111 | APRIL 2013 | 123-XYZ | APRIL 2013 | 654-ABC |
to this (/ stands for a twistie):
\/|SHIP DATES|
|MODULE 1|
|MODULE 2|
The final output would look something like:
\/|April 2013|
123-XYZ (this record would be from MODULE 1)
654-ABC (this record would be from MODULE 2)
\/|June 2013|
876-DEF (this record is from MODULE 1, since there is no ship date for MODULE 2 in this month/year only one job appears)
Is there any way I could merge the ship date columns together?
Categorization of views is the closest equivalent to "Group by" in a Notes view. So you're on the right track using a categorized view (i.e. the categories are the rows at the twistie level)
You should be able to achieve this using the setting "Show multiple values as separate entries" in your view. Set the Module column's formula to be
Module1:Module2
That means the value of that column is a multi-value list with two entries, the value of module1 and the value of module2.
For your categorized column formula, you should be able to use
#Unique(ShipDate1:ShipDate2);
to get the column to show the ship dates.
In the Ship Dates column you can "merge" the two fields by combining them with a colon. So if the two fields are called ShipDate1 and ShipDate2 the column formula is:
ShipDate1:ShipDate2
You also have to mark this property on the column:

Resources