Multi-select fields on Generic Inquiry - acumatica

How do you filter on multi-select fields on generic inquiry?
Assuming your data looks like this :
ROW VALUES
A 1,5
B 3,4,5
C 5
D 1,2,3
E 2,4
And you want too search for records where there is either 1 or 3. So it should show rows A, B & D. I'm not sure if its possible. So the alternative would be write a custom screen and manipulate via view delegate. I could be wrong though.
TIA

The PXMultiSelector editor control persists the values in string format
How to filter depends on the format. Email address for example have a pre-determined format. For those you can add a standard string filter like Field Contains c#d.com
That wouldn't work for numbers. If you search for number 1 in list 2,4,15 it would return the result because 15 contains 1. To workaround this issue you can add a custom unbound DAC field. In the DAC field property getter you can parse the value of the multi-selector field and reformat it to a pre-determined format like ,2,4,15, and filter on ,1, instead of 1.

Related

Excel - How to Filter out Values Based on 2 fields

Does anyone know how to filter out values based on two fields?
Basically, I have 3 columns, turbine ID, String ID, and Area.
I am wanting a formula that when I put in the Turbine ID (from column A), it then looks at the string ID (in column b) and then filters all the values out which are in column B from Column A.
I.e
If I put Turbine = 6, it then filters out turbines 4,2 from the list.
|Turbine ID | String ID | Area |
1 8,9 800m2
6 4,2 600m2
I then want to summarie the Area_HA (i can do this part)
Here is a picture for better explanation:
For this answer consider you have a cell the contains the desired turbine ID known as [Turbine] and you have a cell that contains the desired string ID known as [String]. Let's also consider that your data is in the range of A1:C100 .
Let's say that you want Contains... for String ID then use.
=FILTER(A1:C100,(A1:A100=[Turbine])*(ISNUMBER(SEARCH([String],B1:B100))))
Let's say that you want Equals... with all other items as above then us:
=FILTER(A1:C100,(A1:A100=[Turbine])*(B1:B100=[String]))
References

How to reproduce the equivalent of a Countif excel function in Business Objects?

I'm from France (sorry for my english) and I am currently working on the latest version of Business Objects (business-intelligence suite from SAP).
I would like to transpose an Excel formula to Business Objects, but I cannot. Could someone be able to answer me how to reproduce the equivalent of a Countif function, please ?
In my example, I have a whole list of repeating social security numbers to which I have appended a variable number taken from another field. I would like to do a count for each security number and know how many of them have the "2" value attached to them in my other field.
Example :
For 1741111111100 | 17411111111001, the result in a new field will be 2.
For 1741111111100 | 17411111111001, the result in a new field will be 2.
For 1741111111100 | 17411111111002, the result in a new field will be 2.
For 1741111111100 | 17411111111002, the result in a new field will be 2.
For 1741111111100 | 17411111111003, the result in a new field will be 2.
For 1751111111100 | 17511111111001, the result in a new field will be 1.
For 1751111111100 | 17511111111002, the result in a new field will be 1.
For 1751111111100 | 17511111111003, the result in a new field will be 1.
For 1761111111100 | 17611111111001, the result in a new field will be 0.
For 1761111111100 | 17611111111001, the result in a new field will be 0.
For 1761111111100 | 17611111111003, the result in a new field will be 0.
In excel it's easy to do with a Countif function but how could I do this in Business Objects, please ?
Thank you in advance because I spent a whole afternoon in vain.
RE-EDIT
Here's the same example with excel :
1741111111100|1|17411111111001|2|
1741111111100|1|17411111111001|2|
1741111111100|2|17411111111002|2|
1741111111100|2|17411111111002|2|
1741111111100|3|17411111111003|2|
1751111111100|1|17511111111001|1|
1751111111100|2|17511111111002|1|
1751111111100|3|17511111111003|1|
1761111111100|1|17611111111001|0|
1761111111100|1|17611111111001|0|
1761111111100|3|17611111111003|0|
A column :
there are my security numbers (1741111111100 repeated 5 times, 1751111111100 repeated 3 times, 1761111111100 repeated 3 times)
B column :
It's a number between 1 and 3.
C column :
I concatenated A column + B column like =CONCATENATE(A1;B1)
D column :
Here are my countif functions done like this :
=COUNTIF(C$1:C$11;CONCATENATE(A1;"2")) that gives a quantity of "2".
=COUNTIF(C$1:C$11;CONCATENATE(A2;"2")) that gives a quantity of "2".
=COUNTIF(C$1:C$11;CONCATENATE(A3;"2")) that gives a quantity of "2".
=COUNTIF(C$1:C$11;CONCATENATE(A4;"2")) that gives a quantity of "2".
=COUNTIF(C$1:C$11;CONCATENATE(A5;"2")) that gives a quantity of "2".
=COUNTIF(C$1:C$11;CONCATENATE(A6;"2")) that gives a quantity of "1".
=COUNTIF(C$1:C$11;CONCATENATE(A7;"2")) that gives a quantity of "1".
=COUNTIF(C$1:C$11;CONCATENATE(A8;"2")) that gives a quantity of "1".
=COUNTIF(C$1:C$11;CONCATENATE(A9;"2")) that gives a quantity of "0".
=COUNTIF(C$1:C$11;CONCATENATE(A10;"2")) that gives a quantity of "0".
=COUNTIF(C$1:C$11;CONCATENATE(A11;"2")) that gives a quantity of "0".
I was interested by the "2" value attached to the security number and the number of security numbers concerned by this attachment.
So, it's easy to do with excel but so so so hard to do with B.I. !
Thanx for any help.
Background:
Context Operators:
ForEach
ForAll
In
Operate on "Sets" of data allowing you to parse out data into subsets and aggregate. in SQL this is similar to "Over Partition By" if you're familiar with it.
Answer:
If we assume you create a variable in the report [Concat] as follows:
=Concatenation([A];"2")
Then we can use formula:
=Sum(If([C]=[Concat];1;0)) ForEach([Concat]) In ([C])
Where [C] is your concatenated columns A+B.
Explanation
The above essentially says if [C] = [Concat] return a 1 otherwise return a 0 and then sum the results of those evaluations together.
This occurs ForEach unique value within [Concat]; found in [C].
Logically the system finds all the unique values in [Concat] in then iterates though [C] evaluating if [C]=[Concat] for each case. it then sums the results for each [concat] and then renders those results for each [C]
Additional Point:
In my example the report data was being "combined" due to duplicate values So row 1, row 2 in your example were combined. I had to turn off BO's combining of this row data or my results were skewed. This can be accomplished by formatting the result table and checking the top checkbox "Avoid Duplicate row Aggregation" If you have other values which make each row unique, you will not have this problem. You can turn this off at a query level as well in the query properties of the edit data provider. I believe it depends on what source you use as to which method must be used... But I'm not positive.
So below you can see results from [Cnt] match your expected results in column D using the aforementioned formula.

Setting header to the Calculation sum

I'm using Tabulator 4.9. I set up a table with topCalc:sum.
Now I want to add on a column that has no calculation a text stating "Sum".
I can do that by modifying the cell with the text using Javascript.
Once I edit a field value of o cell in tried to use the cellEdited callback to handle the recalculation. But apparenty the sum is written after this callback to the table and my text disapears.
Is there a way to get hold of the topCalc and add the text afterwards?
User
id
score
Sum
20
user1
1
10
user2
2
10
after editing it looks like
User
id
score
25
user1
1
15
user2
2
10
ok, so if I understand you correctly (without any code examples to go by) you ARE using topCalc:"sum" on your field:"score" column, and want to put the string "Sum" in the topCalc aread of your field:"user" column ?
If so, look at Custom Calculator Functions for your field:"user", just return the string "Sum"

Create a text cell value based on row entries and corresponding columns

I understand this is a tough way of wording the problem I have. Please try and help me.
I want to create a Column called Orders which contains cells based on corresponding item values.
So if I have columns: FlatNo, Truffle, Pineapple, Mango, Chocochips; I want to create a column called Orders which has value:
FlatNo - A51
Mango - 1
Chocochips - 1
(if no values in the Pineapple & Truffle Columns, none show up in Orders columns)
See image
How do I do that ? Thank you in advance
You can use IF and &. & simply puts the different desired things altogether.
Hope the following formula will get you the result for column orders. I have put the number of each item ordered inside parentheses before the item.
="Flat No. "&A2&IF(ISBLANK(B2),"","-("&B2&")"&$B$1)&IF(ISBLANK(C2),"","-("&C2&")"&$C$1)&IF(ISBLANK(D2),"","-("&D2&")"&$D$1)&IF(ISBLANK(E2),"","-("&E2&")"&$E$1)
For instance the third order is shown like this: Flat No. E-23-(1)Truffle -1 Pc Rs 60-(3)Mango -1 Pc Rs 60

Problem sorting a view based on a text field with numeric values in Lotus Notes

An existing Lotus Notes database form has a text field whic contains a numeric value. I am trying create a view to sort on this field but the result is coming up as follows
99
1000
1002
1003
101
1011
Is there any way to convert the field so I can sort numerically. Lotus Notes 6.5.
In the column formula, convert your item to a number using
#TextToNumber( itemname )
Because the text field has numeric values, they are still treated as literal string. So, the easiest way I have found to format them and avoiding #Errors' is to pad them with leading zeroes as well and continue to treat them as a string.
The good thing about this solution is that we're still dealing with strings. No mucking about with data type conversions where you may have data that cannot be converted into a number.
So put this into your column formula and set the sorting options as ascending or descending as you require:
MaxSize := 10;
len := #Length(#trim(yourField));
Pad := MaxSize - Len;
#Repeat("0";pad) + #trim(yourField);
Make sure that your "MaxSize" value is greater than the length of any value it receives. From the sample you've provided, 4 looks like it will do the trick.
(As per Ken's suggestion), if the appearance of the padded column to the user is not appealing, you can make this column a hidden, sorted column and then present the original unformatted (and unsorted) column to the user so it appears in a numerical order.

Resources