Get Variant Attribute Should Search for and return multiple values based on RegEx
I am using Variants as lookup tables (see this article):
Using Variant Attributes to Build a Dictionary or Look-up Table
I would like to be able to use some sort of wildcard to return multiple results from the Get Variant Attribute VI (all results are of the same type, and I don't know the exact names of all the results - those two points make this idea distinct from this idea: Set/Get Variant Attribute for Multiple Attributes).
Ideally the wildcard would be RegEx. If it were, the means by which you specify what to return is standardized.
In the above example, there would be some ambiguity in terms of whether or not you would want to return a result or an array of results given an input, and I doubt you could detect and assume RegEx is what the programmer desires to use. So I think this means a new input would be required to specify whether or not the "name" input of the Get Variant Attribute VI should be interpreted as a RegEx query.
Why RegEx? Why not SQL query? Why not filename wildcard matching?
I don't see anything that makes RegEx special. For this kind of functionality, the code that you've written seems like exactly the right way to do it rather than bolting a RegEx parser or any other system into the primitives or clouding the palette with a bunch of primitives to support various search functions. I could see a primitive that takes a VI refnum that has a conpane of string in/boolean out that you would pass in to supply the filter functionality that you want for any given application, but even that I'd lean toward just letting that be a library that someone writes on top of the primitives. Yes, there is some memory reduction that can be done if it is internal to the primitives, no question about that. But there are so many variations in how to do that filtration/sorting/etc that I'm not confident that any prim would cover a sufficient use case to be worth it. I could be wrong here ... let's see what other comments come in.
Similar Messages
-
Search and return multiple value.
Hello!
I have a little problem that I need help with. It's a little complicated so bare with me.
I have multiple tables of Income for different people. The table is like this
Table Name: A's Income
Date ........ Amount
5/1/09 .... 5.55
5/3/09 .... 7.89
5/3/09 .... 8.90
5/7/09 .... 3.45
I created a new table to log down each day income across every person's table. So it's something like this
Table Name: Total Income by Date
Date ....... Amount
5/1/09 ... = Income of A + B + C, etc.
5/2/09 ... = " "
5/3/09 ... = etc.
5/4/09
5/5/09
5/6/09
5/7/09
So here's the formula for the Amount under the Total Income by Date table
=IF(Date = IFERROR(LOOKUP(Date, A's Income :: Date), 0), LOOKUP(Date,A's Income :: Date,A's Income :: Amount), 0)
That's only for one person (A) I would add the rest into the formula, but the problem is that if Person A has multiple income logged for the same date like the first table (5/3 - 7.89 & 5/3 - 8.90) the LOOKUP(Date,A's Income :: Date,A's Income :: Amount) only return the first value it finds. Is there a function or method I could do to return both value together? I tried SUMIF(A's Income :: Date, "= Date", A's Income :: Amount)
If there needs to be any clearing up please tell me.
Thanks a lot.
Message was edited by: Douten
Message was edited by: Douten
Message was edited by: DoutenWow thank you so much!! I never knew the answer was that simple. I thought that if we wanted to use SUMIF it would have to be SUMIF(A's income :: $A,"= A",A's income :: B). I never tried your solution. Thanks a lot again!
Can you explain a little bit more on your B ("Sum") Column? I'm still new to excel programs, why did you do =SUM(OFFSET($A$1,ROW()-1,2,1,COLUMNS(2:2)-2)), instead of something like SUM(C,D)?
Thanks -
Search help to return multiple values
Hi all,
I've created a search help and I'd like it to return several values to different fields, I don't want these fields to be seen on the selection screen.
For example:
1. User clicks on search help for FIELD1 and selects a value from the pop-up box
2. Program populates FIELD1 depending on the user selection
3. Program also populates FIELD2 and FIELD3 which can be used in the program at a later date.
I can do 1 and 2 but I'm having an issue with 3. I've tried selecting all fields in the search help as Export, but although that populates the fields in the search help test facility, it doesn't know which fields I want it to populate in my program.
I've also tried using FM F4IF_FIELD_VALUE_REQUEST but can only get this to return one line in table RETURN_TAB.
The screen fields are declared as:
PARAMETERS: FIELD1 LIKE TAB1-FIELD1 MATCHCODE ZSEARCH_HELP,
FIELD2 LIKE TAB1-FIELD2 NO-DISPLAY,
FIELD3 LIKE TAB1-FIELD3 NO-DISPLAY.
Any help is appreciated.
GillThanks for your suggestion but what I failed to put in my original post was that FIELD1 is a description field and FIELD2 and FIELD3 are the actual key fields for the table which I need.
So, I can't do your suggestion of populating them based on FIELD1, I need to know which line the user selects to populate these key fields as FIELD1 may not be unique within the table.
Does that make sense?
That's why I wanted the search help to return all 3 values then I can populate FIELD2 and FIELD3 from that. -
Comma separated values for input and return multiple values
Hello everyone,
I have this simple package. Can someone suggest a way to accept multiple empno as input (comma separated) and to return set of salary values for the set of employee numbers (compatible to work with lower Oracle versions). Thanks much!
CREATE OR REPLACE PACKAGE test_multi IS
FUNCTION GET_sal(P_empno IN emp.empno%TYPE) RETURN NUMBER;
END test_multi;
CREATE OR REPLACE PACKAGE BODY test_multi IS
FUNCTION GET_sal(P_empno IN emp.empno%TYPE) RETURN NUMBER IS
V_sal NUMBER(10,2);
MSG VARCHAR2(200);
BEGIN
SELECT sal
INTO V_sal
FROM emp
WHERE empno = p_empno;
RETURN V_sal;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('No data found.');
IF (V_sal IS NULL OR V_sal = 0) THEN
V_sal := 0;
END IF;
RETURN V_sal;
WHEN OTHERS THEN
MSG := SUBSTR(SQLERRM, 1, 70);
DBMS_OUTPUT.PUT_LINE(MSG);
END GET_sal;
END test_multi; -- End packageA way to do this in 10g or above...
SQL> ed
Wrote file afiedt.buf
1 with e as (select '7499,7698,7654,7902' as enos from dual)
2 --
3 select empno, sal
4 from emp
5 where empno in (select regexp_substr(enos,'[^,]+',1,rownum)
6 from e
7* connect by rownum <= length(regexp_replace(enos,'[^,]'))+1)
SQL> /
EMPNO SAL
7902 3000
7698 2850
7654 1250
7499 1600
SQL>As for Oracle 8, .... well.... like Oracle, I no longer use unsupported versions, so I'd recommend you upgrade to something that is supported. -
UPDATE statement based on query and return multiple value
Hi everybody,
I have two tables: temp3 and temp
One of them (temp3) should be updated based on the query where clause (id and flag columns).
I run this query but it updates all of the records in the temp3. I want to update only records with 'UPDATED' flag.
update temp3 t3
set (id,name,address) = (select t.id, t.name, t.address from temp t, temp3 t3
where t.id = t3.id and t.flag = 'UPDATED');
Does any body know how I can do it?
I appreciate your help
ThxHello
Basically you're missing a where clause on your update statement to restrict rows in t3 to the ones that have a corresponding row in t1.
SQL> select * from dt_test_t1;
ID NAME ADDRESS ROW_STATUS
1 Joseph Bloggs Some street UPDATED
1 Joe Bloggs Old street OLD
2 Fredrick Bloggs New street UPDATED
2 Fred Bloggs Some street OLD
3 Robert Bloggs Better street UPDATED
3 Bob Bloggs Some street OLD
100 Barry Bethel Some street UPDATED
200 Giles Brandreth Some street UPDATED
8 rows selected.
SQL> select * from dt_test_t3;
ID NAME ADDRESS ROW_STATUS
1 Joe Bloggs Old street
2 Fred Bloggs Some street
3 Bob Bloggs Some street
4 Joe Smith Some street
5 John Doe Some street
--this update as it stands does not work as it updates rows to have
--null name and address where there is not a proper matching row in
--t1
SQL> UPDATE
2 dt_test_t3 t3
3 SET
4 ( t3.name,
5 t3.address,
6 t3.row_status
7 ) = (SELECT
8 t1.name,
9 t1.address,
10 t1.row_status
11 FROM
12 dt_test_t1 t1
13 WHERE
14 t1.id = t3.id
15 AND
16 t1.row_status = 'UPDATED'
17 );
5 rows updated.
SQL> select * from dt_test_t3;
ID NAME ADDRESS ROW_STATUS
1 Joseph Bloggs Some street UPDATED
2 Fredrick Bloggs New street UPDATED
3 Robert Bloggs Better street UPDATED
4
5
SQL> rollback;
Rollback complete.
--Now add in the where clause to make sure we're only updating rows in
--t3 that have a corresponding row in t1:
SQL> UPDATE
2 dt_test_t3 t3
3 SET
4 ( t3.name,
5 t3.address,
6 t3.row_status
7 ) = (SELECT
8 t1.name,
9 t1.address,
10 t1.row_status
11 FROM
12 dt_test_t1 t1
13 WHERE
14 t1.id = t3.id
15 AND
16 t1.row_status = 'UPDATED'
17 )
18 WHERE
19 EXISTS( SELECT
20 NULL
21 FROM
22 dt_test_t1 t1
23 WHERE
24 t1.id = t3.id
25 AND
26 t1.row_status = 'UPDATED'
27 );
3 rows updated.
SQL> select * from dt_test_t3;
ID NAME ADDRESS ROW_STATUS
1 Joseph Bloggs Some street UPDATED
2 Fredrick Bloggs New street UPDATED
3 Robert Bloggs Better street UPDATED
4 Joe Smith Some street
5 John Doe Some streetHTH
David -
Return multiple values from dynamic lov in apex 3.2.1
Hi
I need to create a dynamic lov that displays multiple values from a table and RETURNS multiple values into display only fields in a form page to be saved to the database
For example
dynamic list of value name SERVER
select name || ',' || life_cycle d, name r
from sserver
order by 1
This SERVER LOV is attached to the P4_SSERVER_NAME field in the form.
However this only returns sserver. name into the P4_SSERVER_NAME field in the form. I would need to capture the life_cycle field as well and populate the P4_LIFE_CYCLE field in the form as well. How does one do this?
I have searched this forum however could not find a thread that fit my situation. i saw that in 4.2 there is dynamic action however unable to upgrade at this moment.
any suggestions are greatly appreciated.
thank youHi CRL,
One method is to set the value of your P4_LIFE_CYCLE item via APEX_UTIL.set_session_state
To do this you need to create a Page Process
Type PL/SQL anonymous block
Process Point On Load - Before Header
The source for the Process might look like this: DECLARE
l_life_cycle VARCHAR2 (50);
BEGIN
SELECT life_cycle
INTO l_life_cycle
FROM sserver
WHERE :p4_sserver_name = sserver.name;
APEX_UTIL.set_session_state ('P4_LIFE_CYCLE', l_life_cycle);
END;Jeff -
I have Mac OS X Version 10.6.8 ,I want to buy the updated operating system that puts iMessage and Facetime on my Macbook Pro. What should I search for, and then purchase, in the App Store?
FaceTime can run in the version of OS X that you currently have. To get Messageyou need Mountain Lion. The protocol used by Messages is iMeassage.
The question is does your MBP meet the specs for Mountain Lion.
iMac (Mid 2007 or newer)
MacBook (Late 2008 Aluminum, or Early 2009 or newer)
MacBook Pro (Mid/Late 2007 or newer)
MacBook Air (Late 2008 or newer)
Mac mini (Early 2009 or newer)
Mac Pro (Early 2008 or newer)
Xserve (Early 2009)
Your Mac needs:
OS X v10.6.8 or OS X Lion already installed
2 GB or more of memory
8 GB or more of available space -
Anyone help? I click on buttons within websites and my mac opens new webpages advertising, mac keeper pro or some foreign exchange trading platform. Did i pick something hop in a download? how do i search for and get rid of this annoying infiltration?
You've installed some form of adware. Take a look here: http://www.thesafemac.com/arg/
-
Any way to search for and get rid of duplicate songs?
Is there any way to recognize and then get rid of duplicate songs? I copied some songs from a different computer and ended up duplicating some of my existing songs. Any way to search for and then get rid of the duplicates?
The apple algorithm for detecting duplicates is not great. I did this yesterday on a library which had got bloated by various itunes 'organisations' and had 15000 songs in it and downloaded idupe. It seemed to work very well and got me down to 10,000 songs. 8USD shareware.
-
I've got a file of about 100 typefaces, which is 1000s of fonts. I want to install them all but I dont want to have to open each file and install them all individually (or in small groups).
So is there a way to search for and install ALL uninstalled fonts in one hit?
Cheers.The best solution I've come across so far is to dump all movies into a shareware app called iVI. It'll show whether each movie has subtitles or not.
-
Pb with "Get Variant Attribute" LabVIEW 6
hello
I want to find the value corresponding to the variable name in a Variant structure. For this purpose I use the "Get Variant Attribute" function, but I do not get any good result : no result in the get value, and also when no string name input is given to get all the attribute of the variant.
where is the bug ?
thank youHi,
No bug, Get Variant Attribute returns values you've put in it using Set
Variant Attribute.
Unfortunately there is no way (I could think of) to get the text of a
variant out of the variant in string format.
Regards,
Wiebe.
"hub" wrote in message
news:[email protected]..
> hello
> I want to find the value corresponding to the variable name in a
> Variant structure. For this purpose I use the "Get Variant Attribute"
> function, but I do not get any good result : no result in the get
> value, and also when no string name input is given to get all the
> attribute of the variant.
> where is the bug ?
> thank you -
I m using LV 6.0.2, the function "get variant attribute" does not work. I
get nothing out of it: no error, no values.
Any idea?!
Actually I could need exactly the string that is shown in a variant
indicator/control.
e.g.:
'Cluster': cluster of 2 elements
'Array': 1-D array of
'Numeric': double
'Boolean': boolean
'Array' -> (2.000E+0, 2.000E+0)
'Boolean' -> FALSE
Has anybody an idea how I can get this as a string?
Thank You.
Max
-> [email protected] / [email protected] <-
-> Max Weiß * Eulenweg 2 * 76356 Weingarten * Germany <-
-> Fax/Voicebox: 0180 505254775181 * Tel: +49 162 9114507 <-
-> ICQ: 123429315 * DB 8 MWE <-The reason you can't get an attrivute of the vairant is because your variant doesn't have any. Use "Set Variant Attribute" to add an attribute to your variant, and then you should be able to read it back later using the "Get Variant Attribute".
cheers,
Christopher
Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License. -
How to search two columns and return a value in the same row to a cell?
Identification
Diameter
Soak
3" Tank (inches/kft)
AWG
mils
Code
Strands
Shield
Conductor
Insulation
Semi-Con
Days
SD
Injection
Soak
Total
2
175
00
7
External
0.288
0.692
0.752
60
0.4
3.6
20.0
23.6
2
220
00
7
External
0.284
0.764
0.864
75
0.4
3.6
20.0
23.6
2
260
00
7
External
0.284
0.844
0.944
90
0.4
3.6
21.8
25.4
2
320
00
7
External
0.288
0.964
1.064
110
0.4
3.6
24.3
27.0
2
345
00
7
External
0.288
1.014
1.114
115
0.4
3.6
25.6
29.2
Length
3"
4"
AWG
mils
Soak
SD
Injection (3")
Injection (4")
650
2
320
I want to input two values, AWG and mils and return the value in the Days column.
In the instance of what I am showing .... AWG=2 AND mils=320 so Soak=110 ....
I want to search the columns (AWG) AND (mils) to return a value in the column (Days) for that row into cell H10 (Soak) ...
So far I have toyed with LOOKUP, INDEX and MATCH ....SCW,
I'm sure there is a clever way to cascade functions to avoid adding an auxiliary column in your practice table, but to me it wouldn't be worth the aggravation. I would add a column that concatenates Columns A & B, AWG & mils. This column can be anywhere and would be Hidden. Let's say your new column is Column N.
In Column N, fill the body rows with:
=A&"-"&B
As good Numbers programming form would indicate, let's name the Practice Table Practices and only put the practices in that table. In another table where you do the lookup, let's call it Program, we will have the calculation/lookup.
Based on your example, I'd guess that AWG may be in Column D and mils in Column E of your Program table, and the Soak lookup in Column F. If I'm wrong, adjust the column id.
In Column F, write:
=OFFSET(Practices::I$1,MATCH(D&"-"&E, Practices::N,0)−1, 0)
The hyphen in the concatenated representation of the combination of AWG and mils is just tp make it more readable.
As I'm sure you know, you could use other approaches, but since I had you put your aux column at the end of your Practices table, OFFSET with MATCH is a clean approach. INDEX could be used too.
Here's an illustration:
Regards,
Jerry -
Revision: 18471
Revision: 18471
Author: [email protected]
Date: 2010-11-05 10:22:11 -0700 (Fri, 05 Nov 2010)
Log Message:
bug fix for 2749575 The API -- mx.messaging.messages.MessagePerformanceUtils; associated attributes/properties like totalTime are returning negative values
Change adding set method for receive time to avoid it override the value set by detecting it is an OUT infoType
BlazeDS checkintests pass
Modified Paths:
flex/sdk/branches/3.x/frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanc eInfo.asDear Pallavi,
Very useful post!
I am looking for similar accelerators for
Software Inventory Accelerator
Hardware Inventory Accelerator
Interfaces Inventory
Customization Assessment Accelerator
Sizing Tool
Which helps us to come up with the relevant Bill of Matetials for every area mentioned above, and the ones which I dont know...
Request help on such accelerators... Any clues?
Any reply, help is highly appreciated.
Regards
Manish Madhav -
How will get subquery return multiple values and passing to the main query
Hi all ;
here i given one sql query
1)select decode(a.FLG,'Y','yes','N','no','null')||'] '||a.p_type||' : '|| initcap(replace(substr(b.mgr,0,instr(b.mgr,'@')-1),'.',' '))||' - '||
b.name||' ('|| substr(a.name,0,instr(a.name,'-')-1)||')'
from table1 a
join table3 c on c.emptype = a.emptype
left outer join table2 b on a.name = b.name
where a.mgrid = 100;
if i run this above query returning multiple values depend on sa.mgr values.
like output coming like this
[yes]:2000-anbarasan
[yes]:2700-anb
[yes]:2000-rasan
[yes]:2807-anbarasan
[yes]:2700-anbanu
[yes]:2000-null
2) this sub query i am passing with main query
select sa.mgrid,sa.sal,(select decode(a.FLG,'Y','yes','N','no','null')||'] '||a.p_type||' : '||
initcap(replace(substr(b.mgr,0,instr(b.mgr,'@')-1),'.',' '))||' - '||
b .name||' ('|| substr(a.name,0,instr(a.name,'-')-1)||')'
from table1 a
join table3 c on c.emptype = a.emptype
left outer join table2 b on a.name = b.name
where a.mgrid = 100)" test " from table4 sa,table5 te ,table6 ft where sa.id(+)=te.id and sa.mgr=ft.mgr;
my final out put required like this:
mgrid sal test
100 20000 [yes]:2000-anbarasan
[yes]:2700-anb
[yes]:2000-rasan
[yes]:2807-anbarasan
[yes]:2700-anbanu
[yes]:2000-null
but i am getting erro:
1)missing paranths-it solved
2)single row subquery return more then one row.
give me the correct solution.how will solve this problem
Edited by: anbarasan on Sep 29, 2008 6:49 AM
Edited by: anbarasan on Sep 29, 2008 6:51 AM
Edited by: anbarasan on Sep 29, 2008 6:53 AM
Edited by: anbarasan on Sep 29, 2008 6:56 AM
Edited by: anbarasan on Sep 29, 2008 6:58 AMHi,
It doesn't look like you posted either the complete query or the complete error message (including line number). Try again.
"single row subquery return more then one row" usually means you are using a sub-query in a place where a single expression is expected, for example the column called avg_sal in this query:
SELECT ename
, sal
, (SELECT AVG (sal) FROM scott.dept WHERE deptno = e.deptno) AS avg_sal -- Scalar-sub-query
FROM scott.emp e; The error occurs when the sub-query returns more than one row
If the sub-querry really is supoosed to be returning only one row, the solution is to fix the sub-query, usually be adding something to the WHERE clause.
If the sub-query is supposed to return more than one row, then the main query has to be re-written, perhaps as a join.
Post a little sample data and the results you want from that data if you need help.
Maybe you are looking for
-
Purchase Order triggering Sales Order using Inbound Idocs
Hi All, Can any one explain the flow of Purchase Order triggering Sales Order using Inbound Idocs..?? Thanks & Regards Anoop
-
Set browser window size?
Is it possible to set the browser window - specifically IE - when opening my form when using seperateFrame=false? I am developing a single window app that is lost in the IE window when it starts up. I would like to size the IE window in relation to m
-
On one of my sites I have a very simple page http://www.cydelia.org.au/Management.htm), which is supposed to display the following lines: "For further information contact the Secretary at: [email protected]" the code to do this is: <p>For further inf
-
Photosmart 7510 Scan to eMail does not send the eMail
I can scan a document to a file, go to my email, attach the scanned document and send it with no problem. However, when I use the Document to Email feature, an email window opens up on my desktop with my send from email address properly included and
-
Reading AQ messages in sequencing order.
Hi, In order to make sure that the BPEL process reads the messages from the queue in a sequence. There were two things suggested in some document. 1. Make sure the Actication Adapter is configured to run only one oc4j instance inside the BPEL Cluster