Formatted string in the Workbench

Hi all

I'm on LC 8.2 and the database is SQL Server.  My requirement is: I need to send emails to a process to all members of a particular group of users.  As much as I know there is no functionality in workbench that helps me do that.  I therefore e-mail ID of the database.

Here's my query:

SELECT ',' + prin.email
From edcprincipalentity AS main,.
edcprincipalgrpctmntenti AS gr
WHERE prin.id = gr.refchildprincipalid
AND refparentprincipalid = (SELECT id FROM edcprincipalentity lcuser
WHERE lcuser.principaltype = 'GROUP '.
AND lcuser.commonname = "< GroupName >")

And the result will be like this:

, [email protected]

, [email protected]

, [email protected]

I use 'Query for multiple lines in XML', to query the database.  Now, I need to convert it to a string of plan containing email ID inorder to use in the control of the Email.

I use SetValue executes control to convert that.  I have a string variable in which I put the string value of the xml using serializable.

/process_data/@EmailIds = serialize(/process_data/EmailIdsFromDB)

It gives me the chain EmailIds = ",[email protected] [email protected] [email protected]" " " ".

Now my problem is I can not use the result directly on my Email control because it contains a comma.  I have to remove this one somehow.

/process_data/@EmailIds = substring (/process_data/@EmailIds, 2)

But I do not get the desired result.

Can someone help out me or suggest me another method to do this?

Thank you

Deepak

Ok

Let's try a different approach.

You have your xml data in an xml variable right?

Why not just use a setValue with an xPath expression to get the value of all the nodes.

You can get the number using the following xPath expression: count(/process_data/xmlvar/Email/EmailId)

Then, to set a counter variable I (integer data type) to the value of count.

Then, wrap and increment the counter and the build you string using the XPath following

/process_data/@strlist = concat (/process_data/@strList,/process_data/xmlvar/Email/EmailId, [process_data/@i], /mailId)

You may need to replace process_data/@i by number (process_data/@i) for the xPath expression work correctly.

Jasmine

Tags: Adobe LiveCycle

Similar Questions

  • problems by analyzing a date format string...

    Hi all, I'm having a hard time to convert a date into a string.

    I was using to_char but after much research, I thought that it would be better to use convert so I do:

    SELECT CONVERT (VARCHAR (8), 'November 19, 2012', 112) twice;

    Where the specifications for 112 is YYYYMMDD but I get the error "ORA-00936: lack of expression ', guess is cause Oracle do not know how to read the string to be converted.

    How can I convert a YYYYMMDD string format string of the form dd mmm yyy (as described above)?

    Thanks in advance,

    It seems that your search will lead you to a SQL Server thread. SQL Server uses arbitrary numbers to represent date formats. Oracle does not - the number 112 is irrelevant for Oracle.

    In Oracle, you convert a date to a string using the function TO_CHAR

    SELECT to_char( date '2012-11-19', 'YYYYMMDD' )
      FROM dual
    

    Of course, this assumes that you start with a date (like I do with my date literal). If you start with a string representing a date and you want to convert it to a string that represents the same date in a different format, you will need to use a TO_DATE and a TO_CHAR to convert the original string to a date and date on another string

    SELECT to_char( to_date( '19 Nov 2012', 'DD Mon YYYY' ), 'YYYYMMDD' )
      FROM dual
    

    Justin

  • Analysis of the variable format string

    Question, I have a string I need to analyze in separate string variables. Analysis errors out string if the string is parsed cannot fill every type defined in the string format. The problem I have is that the string length varies depending on multiple strings separated by spaces up to 13 different string types sometimes and sometimes only 6. Is there another way to scan the string in different channels with the command of token or something and not use this as the format varies?

    I've attached an example of what I'm trying to do.

    Thank you.

    Here you go...

  • string in the format spreadsheet in table: Missing comma

    Hi all

    Plug-in function "string in the format spreadsheet en table" with LabVIEW 2014. I do not understand why, but the point numbers are truncated at the output of the function.

    This is the VI as an attachment.

    Thanks for your help!

    Hello

    The decimal separator of your OS comma an EST. So either you replace it with a point or you replace the %f in your code by %; % f:.

  • BUG: Date/Time Format string with %D in the format string crashes LabVIEW

    Do %D in the format string 'Format string DateTime' blocks LabVIEW 2009 SP1, as shown in this code snippet.  Should I use instead of %D %d but an incorrect format string should not crash LabVIEW.

    Fixed in 2010.

  • Unit to the Format string

    Hi all

    If a control already has a unit, and move us to a format based on the string, its does not display is not the same exact unit. For example, under control has 'g' unit, while the format string has unit "kg".

    1. Is it possible to do the format to a string take the exact unit specified in the control?
    2. Is there a way to delete unit in the format based on the string, even if the digital order entry has a specified unit?

    Attachment VI to 2010.

    Thank you

    Knockaert

    Not automatically, no. The problem is that the designation of the unit in effects only control how data is displayed in a particular control. When wire you a value with units in a format to the node of the chain, it will express the value of the base unit for the wire.

    Mike.

  • String.format unrecognized in the BlackBerry project?

    I'm trying to fill a string but String.format (string, string) is not recognized:

    "The format of the method (String, String) is not defined for the String type.

    Although I use jdk 1.6 and I noticed that, if I open a regular java project this recognized.

    someone at - it be able to use it?

    http://www.BlackBerry.com/developers/docs/4.2api/Java/lang/string.html

    Does not exist. BlackBerry is not regular Java.

  • TO_DATETIME gives the error ORA-01861: literal does not match the format string

    When I use the following in a formula in the column in the business model, the administration of BI tool does not complain:

    TO_DATETIME (LEFT ("registration - College". "D time". " ("' Exercise ', 4) | ("/ 09/01 ', ' yyyy/mm/dd')

    But when I use it in an analysis, I get the error message:

    ORA-01861: literal does not match the format to the call of the OIC string

    The scope of practice is a varchar of 6 characters (e.g. 201213), so I do not know what causes this error. Is this because the TO_DATETIME expects something like hh as argument?

    Without the element that to_datetime is supposed to work, here is an example that I made on SampleApp406.

    Try to add the "time", but for me it has always worked without problem.

  • How to add a string to the end TLFTextField without losing the current text format!

    • I have a TLFTextField which loads the text of the external text file.
    • Then a function changes the format of certain parts.
    • Then, as soon as I add a string to the end my TLFTextField, all previous formatting is lost!

    I use this code to add the string:

    • myTLF.text += ".";

    or

    • myTLFText.text = myTLFText.text.concat(".");

    Should I use another method?

    Sample.png


    pass again the text through your function put shaped, or try appendText:

    • myTLF.appendText(".");
  • SQLERRM: ORA-01861: literal does not match the format string

    Here's what I want to do.

    Select to_char (to_date (estimatedshipdate, 'DD-MM-AA'), 'YDDD')
    of cram_stg
    where estimatedshipdate = 14 January 11 ';

    TO_CHAR (TO_DATE(ESTIMATEDSHIPDATE,'MM-DD-YY'), 'YDDD')
    -----------------------------------------------------
    1014


    1 selected lines


    I want to convert the shipping date is DD-MM-AA YDDD, but in my program:

    v_est_ship_date varchar2 (10);

    ESTIMATEDSHIPDATE VARCHAR2 (10) in a TABLE

    v_est_ship_date: = to_char (to_date (CRAM_PTCLICK_REC.estimatedshipdate, 'DD-MM-AA'), 'YDDD');

    I get this problem

    SQLERRM: ORA-01861: literal does not match the format string


    I want to assign the result of the function to_char to v_ext_ship_date. What I am doing wrong? Thank you.

    Hello

    It's just one of the reasons for which the storage of dates as VARCHAR2 columns is a bad idea.
    Apparently, some (maybe just one) this column values is not the right format. To find malformed (the kind that cause the ORA-01861) values, you can do something like this:

    SELECT  primary_key
    ,     estimatedshippingdate
    FROM     cram_stg
    WHERE     TRANSLATE ( estimatedshippingdate
                , '012345678'
                , '999999999'
                ) != '99-99-99'
    ;
    

    It intercepts any mistakes as the 32nd day of the month (let alone ' 02-29-11'). See the next thread of a way to do this:
    Re: How to select valid dates only

  • Failed to run backup using the format string

    Hi all

    Need help with RMAN, my problem as below:

    RMAN > run {}
    2 > level 1 incremental backup cumulative
    3 > format "D:\ora\rmanbackup\RCKLGC_INC < % s: T: %p % _ > .dbf.
    4 > tag data base 'DAILY_DATAFILES ';
    {5 >}

    From backup 29 June 09
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID = 145 type device = DISK
    channel ORA_DISK_1: starting from compressed data file backup set incremental level 1
    channel ORA_DISK_1: specifying datafile (s) in the backup set
    Enter a file 00005 name = E:\ORA\ORADATA\RCKLGC\MGMT = datafile number. DBF
    Enter a file name 00002 = E:\ORA\ORADATA\RCKLGC\UNDOTBS01 = datafile number. DBF
    Enter a file name 00006 = E:\ORA\ORADATA\RCKLGC\MGMT_ECM_DEPOT1 = datafile number. DBF
    Enter a number of file datafile = 00001 name = E:\ORA\ORADATA\RCKLGC\SYSTEM01. DBF
    Enter a number of file datafile = 00003 name = E:\ORA\ORADATA\RCKLGC\SYSAUX01. DBF
    Enter a file name 00007 = E:\ORA\ORADATA\RCKLGC\DATAFILE\O1_MF_RMAN_DAT_4M9QWZT5_ = datafile number. DBF
    Enter a number of file datafile = 00004 name = E:\ORA\ORADATA\RCKLGC\USERS01. DBF
    channel ORA_DISK_1: starting piece 1 to 29 June 09
    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-03009: failure of the backup command on the channel ORA_DISK_1 at 2009-06-29 18:20:49
    ORA-19504: cannot create the file '< _1097:20090629:1 > D:\ORA\RMANBACKUP\RCKLGC_INC. DBF. "
    ORA-27040: create file error, cannot create the file
    04002 - OSD: could not open the file
    S/O-error: (123 OS) the file name, directory name or volume label syntax is incorrect.

    ----------------------------------------

    If I set the format by default %U work string. Can someone help me? The sting of format I used on the database under Linux works fine without any problems.

    Hi faisal.badrom,
    Can you be more specific on the 'format string to meet backup requirement standards "?
    Are you allowed to jump ">".< :"="">
    If you can use:

    format 'D:\ora\rmanbackup\RCKLGC_INC_%s_%T_%p.dbf '.

    Or to extend it again with the name of the database:

    format 'D:\ora\rmanbackup\RCKLGC_INC_%s_%T_%p_%d.dbf '.

    to meet the standard?

    Kind regards

    Tycho

    Edited by: tychos on June 30, 2009 01:33

  • format string IF (always kHz)

    Hello

    I'm reading values from rates to sample different RF bands DBL and using the value to create a file header to store binary data complex 32IQ to the file. I use the format based on string to do, but I still want to be represented in kHz, the sampling frequency and I have not thought of a way to force it is always the case. I use a format string of %.3p which, for sampling rate as 13125 and 400000 he returns 13,125 k and 400,000 k respectively, and that's what I want. However, one of my groups is 3750000 Hz and the format to a string returns Mr. 3,750, I would come back 3750,000 k instead. Does anyone have any ideas on how I might accomplish this?

    Thank you

    Tim

    If you divide the value by 1000 dbl and then apply the format to a string with the specifier %.3f you the kHz value.

    Ben

  • formatted string

    I have different strings in my project, for example:

    12.4432615352312

    I want that all these channels have 2 decimal places, so 12.44; How can I do this? I was looking for 'Format value function' and also 'format as string' (format string), but without success.

    Thank you

    Here's a very easy way

    Although there is probably a method using reg expressions without the intermidiatry changing double.

    Craig

  • How do I change the channel of Julian date to a string of the normal Date of the

    I need to change a code of Julian Date (string format) to a Date code normal (string format).  Is not real-time, so with get a Date doesn't seem to be the solution (unless someone else has a way to do it).  I read one scanned in date in the format:

    YYDDD

    and I would like to change it to:

    YYMMDD

    Is there a quick feature or an easy way to do this?

    Thank you!!

    Scan string followed by a format using the codes of good time to string format strings.

  • Digital format in 0.000E + 0 in format string

    How to format a digital DBL double 0.000E + 0-shaped, functional screws?

    Do I need a REGEX for string format?

    Thank you

    Alan

    saintalan94 wrote:

    How to format a digital DBL double 0.000E + 0-shaped, functional screws?

    You just need 'in Format string' function with the correct entry of STRING of FORMAT .

Maybe you are looking for