Floating Fields with .replace()

Hi All,
I'm having a problem with my floating fields.
I have a variable declared in my function (floatingFunction), lets call the variable sPara.
to sPara I assign a long Paragragh for example; sPara = "I, the undersigned FN in my capacity as a CP..." 
In my hierarchy structure I have foating fields: fullName and capacity and an empty text call it displayfield, these three are in a subform hdDisplayText
I also have  textfields called fullName & capacity.
On exit event of the fullName textfield I have these two lines :
header.hdDisplayText.fullName.rawValue= this.rawValue; floatingFunction.sPara
= floatingFunction.sPara.replace('FN', this.rawValue);
and on prePrint event of hdDisplayTest subform I have this:
this.presence= 'visible';displayfield.rawValue
= floatingFunction.sPara;
When u click the print button for the first time it works fine, now the second time you enter a different Full Name and click print, it still prints what you entered the first time, now that is my problem, I've tried xfa.host.resetData(); after printing but that didnt help. Please assist, please.

Ok I got it, I 'nm using xfa.form.remerge() just after printing.

Similar Messages

  • Floating Fields with Designer ES2

    I just did an upgrade to Designer ES2.
    I created a new form with static textfields and floating textfields
    then i created a button that filles the floating field with a text using javascript.
    xfa.resolveNode("form1.#subform[0].Textfield1").rawValue
    = "it doen't work";
    But it doesn't work
    When i make the floating field visible, so i see the normally hidden field, the i see that the script works, but that te tekst doesn't show in my static textfield
    Anyone else with this problem?
    Can anyone tell me what i'm doing wrong?
    In the previous Designer ES it worked fine and opening those forms in ES2 still work
    But creating a new form with a floating text doesn't work

    I reinstalled Both Designer 8.x and ES2 several times, but i have the same problem with both versions.
    Now i only have Designer 8.x installed on my WinXP.
    i created a new empty form and add a static text field and a button.
    within that static textfield i insert a floating field.
    i add a Formcalc script to the click function of the button: Field.rawValue = "hello"
    i save it as a dynamic form.
    preview the form and when i click the button nothing happens
    Then i change the presence of the floating field to visible, so a normally hidden field is visible
    Now without changing anything i preview the document en click on the button
    Now i see the text in the field i just made visible, but still not in the static textfield where i inserted that floating field.

  • Union two tables with diffrent count of fields with null and float value

    Hello,
    i want to union two tables, first one with 3 fields and second one with 4 fields (diffrent count of fields).
    I can add null value at end of first select but it does not work with float values in second table. Value form second table is convert to integer.
    For example:
    select null v1 from sessions
    union
    select 0.05 v1 from sessions
    result is set of null and 0 value.
    As workaround i can type:
    select null+0.0 v1 from sessions
    union
    select 0.05 v1 from sessions
    or simple change select's order.
    Is any better/proper way to do this? Can I somehow set float field type in first select?
    Best regards,
    Lukasz.
    WIN XP, MAXDB 7.6.03

    Hi Lukasz,
    in a UNION statement the first statement defines the structure (number, names and types of fields) of the resultset.
    Therefore you have to define a FLOAT field in the first SELECT statement in order to avoid conversion to VARCHAR.
    Be aware that NULL and 0.0 are not the same thus NULL+0.0 does not equal NULL.
    In fact NULL cannot equal to any number or character value at all.
    BTW: you may want to use UNION ALL to avoid the search and removal of duplicates - looks like your datasets won't contain duplicates anyhow...
    Regards,
    Lars

  • Generic data source with float field possible?

    Hello,
    when creating an generic data source using a view with a float field I get error R8359 (extract structure: You tried to generate an extract structure with the template structure .... This operation failed, because the template structure quantity fields or currency fields, for example, field ... refer to a different table.).
    I changed the data element from ATFLV to e.g. FLOAT but it did not help.
    SAP hint 335342 deals with this issue, but I just want to use the float number without the unit.
    Is this possible or do I need to write a function module?
    Best regards
    Thomas

    Hi,
    you could try to add the unit table and field to your view. When saving the datasource in RSO2, you can choose to hide these fields if you don't want them extracted into BW.
    Regards,
    Øystein

  • Mail Merge script to replace any blank fields with specific text

    In InDesign Mail Merge I would like to replace any blank fields with specific text. For example if we have four fields (A, B, C & D) to merge, and field A is blank, it would insert field C.
    In essence leaving no blank fields but replacing a blank field with another specific field.
    I have read that inDesign does have Mail Merge limitations but if there is a script that we could run that would solve our problem.
    Please let me know if you can help?

    I take from the lack of response it is not possible to do this in InDesign.

  • How to replace blank values in DATE field with 00000000

    Hi
    I have a DSO with Date field in which there are blank values. I want to replace the blank values in the DSO for date field with 00000000. Because of this blank values in the DSO the report is giving an ORA error.
    How do we replace the blank values in the DSO for historical data and also the new loads?
    Please advise.
    Thank you.
    Regards,
    Pavan.

    Hi Suman,
    I'm trying to run a query built on a DSO. The DSO has a field 'Start Date'. This Start Date InfoObject has a reference Char as 0DATE.
    This Start Field has blank values due to which I'm getting the ORA-01722 error. I came across many threads with same topic of discussion. As mentioned in one of the Threads I have written a program to update 'Start Date' with 00000000. The code wriiten is "UPDATE /BIC/AZ_MONINV00 SET /BIC/ZSTR_DTE = '00000000' where /BIC/ZSTR_DTE = ' '.
    Now when I see the data in the active data table of DSO the blank value is replaced with '00000000'.
    But If I right click on the DSO click on display data the 'Start Date' field is blank. And now the Query also gets executed without any error. But in the output of the query the 'Start Date' Field has "#" values.
    Can anyone suggest on how to remove these "#" values in the report?

  • Replace the empty field with below data content field in xml pub report

    Hi Gurus,
    Please give me the solution for the Replacement of empty field with below data content field in XML PUBLISHER REPORT.
    ex:
    Name:Philips.M
    Address 1:XP APPTS,
    Address 2:S:R ROAD
    Address 3:
    COUNTRY:INDIA
    Here i have to get only address 1,address 2 and the COUNTRY data.I dont want to display Address 3 field here.
    Thanks,
    David

    I'm not sure if this answers your question but you could try putting out the address all in one item in the SQL eg somthing like:
    address1 || DECODE(address1, NULL, NULL, 'newline character') ||
    address2 || DECODE(address2, NULL, NULL, 'newline character') ||
    address3 || DECODE(address3, NULL, NULL, 'newline character')
    where 'newline character' is somthing like CHR(12)
    Dave

  • Comparison with a float field

    Hi,
    I have to compare two float fields, one fetched from database and one passed as importing parameter.
    Now, i get "0.1" as a value in importing parameter for comparison. and the same is stored in the database, i.e. "0.1".
    But when I put a select query on the table and read the value, the value i get is 9.9999999999999995E-02.
    as a result, my comparison fails and the rest of logic crumbles.
    I am aware of the usual standard - not to compare two float variables, but in this case, it is a equipment reading - it has to be in float, which i am comparing against a threshold, which again has to be float.
    Is there any way to fix this through ABAP program?

    There are no conversion exits for floating type of data fields.
    The fields used for comparison are MRMIN, and MRMAX from the table IMPTT.

  • Designer Crashing with floating fields

    I am using Designer 8.0. I have not figured out exactly what the cause is but Designer is crashing pretty regularly whenever I try to use a floating field. It seems like it is related to putting something in the calculate event of the field.

    This was in 2008 so i cannot remember ...if you send the form and a description of the issue I will have a look. Send it to [email protected]
    Paul

  • Background fill floating fields?

    Is there a way to background specific text within a text object? I'm trying to shade my floating fields. It looks like the background fill
    only applies like borders, so it only applies to the entire text object.
    I know you can change the color of words within a text object. Seems like the ability to background fill particular words should be a basic feature.
    Thanks

    I figured this out. When you create the static text object at design time, make sure that it has a word with a different colour or font or something. That will ensure that its value property contains an exData object with contentType="text/html". Now you can change the contents at run time with (I've replaced the angle brackets with {}):
    var theXML = "{body xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\" xfa:APIVersion=\"2.5.6290.0\"}{p style=\"text-decoration:none\"}The{span style=\"xfa-spacerun:yes\"} {/span}{span style=\"color:#ff0000\"}quick{/span} brown fox.{/p}{/body}";
    StaticText1.value.exData.loadXML(theXML,true);
    Jared Langdon
    www.jlangdon.ca

  • Creating Profile type report that hold fields with multiple values

    Really hoping someone can please help me out as I am very new to Crystal Reports.
    We use Maximizer CRM and we have been in need of some custom reports to rule out risk for regulators. I contacted Max and they suggested the only possible way is to create through Crystal. Its been almost one month already and I still cannot for the likes of me get this report operating properly. I have been inside and out on all sorts of forums, posted topics but no luck! So I will give it one more attempt in hopes that one of you geniuses can show me the way.
    In Maximizer CRM there is date, numeric, alphanumric and table. Our table fields items can be set to either single value or multi-value. So in crystal i did a default join of Client.tbl and the user-defined fields from view and joined the client id and contact number from all the view fields to client table. See Image:
    and I have dragged all the relevant fields in rows (in details section) rather then columns because we would be reporting on more then 1 record at a time. My problem is - If there is a table with multiple items selected (values), the records triple in count and it will show the same record over and over with just single field value changing at a time.
    The formula field you see in the image is from when I posted a discussion and Abhilash assisted me by providing the formulas I should add:
    1) Create a formula with this code and place this on the Details Section:
    whileprintingrecords;
    stringvar s := s + {field_with_multiple_values} + ", ";
    2) Next, move all the fields (except the formula field above) from the Details section to the Report Footer
    3) Create a formula with this code and place this on the Report Footer. This field would replace the existing field that contains multiple values:
    whileprintingrecords;
    stringvar s;
    Left(s, len(s)-2);
    This method is not working out for this type of report. When I add the formula Crystal is still counting my 2 records as 5 records but I can only view it as a single record and the multi-field has all the values for both records and displaying as a single record. See image:
    Can anyone please assist and advise where I am going wrong?
    -Jared

    Hi Jared,
    Thanks for taking down memory lane that is Maximizer.  Nice to see their table structure hasn't been simplified in the last 20 years.
    If I understand what's happening, you should only see 2 records and not 5.  That means your joins are creating duplicate records.  For now I'm going to skip over trying to optimize your query because I still have bad dreams of linking Maximizer tables.
    There are a couple of ways to work around the duplicates, one is to create a group and instead of having your formula in the Detail section, put it in the Group Header.  The question is what would you create your group on that would get you a unique record?
    If you know where the duplicates are coming from, create a Record Selection Formula that will remove the duplicates.
    There is also the menu option Database | Select Distinct Records.  I've never really had success with this one but there's no harm in giving it a shot.
    I would have you try and find which table or combination of tables is generating the duplicates but that requires playing with your links.  Normally I'd start by adding one table at a time and dropping one field onto the report.  If it doesn't repeat then add another table and field and repeat until you get your duplicates.  Once you know where they are coming from then you can either drop that table from your query or create a selection formula that removes the duplicates.
    Good luck,
    Brian

  • Formula variable with replacement path on system date

    Hi Experts,
    I got a requirement to calculate "Days without payment" in report level.
    Days without payment = System Date - Payment Date.
    (Payment date field is available in CUBE, but system date field is not available in the CUBE)
    As we know, the difference b/w 2 dates is not possible directly.It can be possible by creating 2 formula variables with replacement paths on the dates and by writing aformula on these 2 formula variables.
    But the thing is I dont have system date readily available, and I tried by using SAP Exit. But we cant create formula variable replacement path on another variable (SAP EXIT).
    Do we have any SAP variable  for formula with replacement path readily avaliable to get system date (or) any other suggession.
    Please suggest me.
    Thanks,
    Sai Chand.S

    Hi Arminder,
    Thanks for your valuable answer.
    I tried doing the same previously.As u said we can get system date by creating customer exit variable.
    But the thing is to find difference b/w 2 dates, we cant do it directly, we need to create 2 formula variables with replacement path.
    1) Var1 = Formula variable with replacement path on system date(custoer exit variable).
    2) Var2 = Formula variable with replacement path on paymanet date.
    Number of days = var1 - var2.
    But as in 1st point, we cant create formula variable with replacement path on another variable, as system date is already a variable of type customer exit.
    We can create replacement paths only on characteristics.
    Please suggest me .
    Thanks,
    Sai Chand.S

  • Formula variable with replacement path to another input variable

    Hi @ all,
    i have a question regarding "Formula variable with replacement path to another input variable".
    My Problem is that in selection screen and for info-fields the input variable is shown with its key and not with its description.
    Scenario:
    A formula variable (X) is used to get an input value of a characteristic variable (Y) for 0Fiscper3 to realize a IF-Then scenario.
    The formula variable (X) uses replacement path by variable (Y) replace by "key".
    In selection screen of the query variable (Y) is named with its key "ZAB_BUPE01" and not with its description " fiscal period". Same as for info-fields where the description is "ZAB_BUPE01" and not " fiscal period".
    Does anybody have a solution to display the selection variable correctly?
    Regards
    Tobias

    Issue Solved!
    The input varaible (y) for 0Fiscper3 was saved globally on the InfoProvider. This results in that the formula variable with replacement path only shows its technical name. I put the input variable in the query itself and it soved the problem. The variable is displayed with its description in selection screen.
    Regards

  • Field with a default value from another field

    I need to populate a field as the default value from another field that the user inputs. I've tried the scripting that I found from the below Topic in the Archived Forums, but I'm not able to make it work. I've tried numerous variations and still to no avail. I tried to make the scripting work in Acrobat 6 and then decided that maybe I needed to upgrade, so I'm now trying it in Acrobat 8 with no results. Can anyone help?
    Topic
    Acrobat 5 - field with default value of another field
    Ben PF - 03:31am Mar 23, 2007 Pacific
    How can I have a field date2 which has the default value of field date1, but which can be edited by the user if necessary without changing the value of date1.
    I've tried, but I just can't figure it out!
    Any help much appreciated.
    Ben
    | Back to Topic List | Bookmark | Subscribe
    To start a NEW discussion click on the Back to Topic List link and select Add Topic.
    If you are in an archive forum please go up to the main topic list (archives are read only).
    Messages
    2 messages. Displaying 1 through 2.
    First Previous Next Last Show All Messages
    Gene Dianoski - 5:22am Mar 23, 07 PST (#1 of 2)
    This, or some variation of this, should work:
    if(this.getField("date2").value == ""{
    this.getField("date2").value = this.getField("date1).value;
    | Bookmark back to top
    Ben PF - 6:49am Mar 23, 07 PST (#2 of 2)
    Thanks very much.
    I put it in at document level to start, but it didn't run the script automatically when date1 was first filled in, so I have put it in as a mouse exit action in date1 and it works a treat.
    Thanks for your help.
    Ben

    Okay forget what I posted above and lets start over. Go to your first field and under Properties -> Actions Tab -> Select Trigger -> On Blur Run A JavaScript.
    Put this:
    this.getField("myField2").value = event.target.value;
    Make sure that you replace ("myField2") with the actual name of your second field. I just tested this and it works for Acrobat version 6.
    I haven't been doing as much javascripting as I used to, so sometimes I too make some basic mistakes.

  • Gung Ho security team vs Debug with replace in development

    Hi fellow developers. I'm trying to talk our security team off the ledge and I want to conduct an informal poll regarding the responsible use of debug with replace in a DEVELOPMENT environment.  For the newer developers.. replace is much more powerful in debugging because you can change the values of variables and some system fields like sy-subrc which makes it very powerful.
    Our development environment is setup as follows:
    Client 300, ABAP Development \config.  We promote to QA, and Prod from here but can't unit test because no data allowed.  Debug with NO replace allowed here.
    Client 320 Unit testing, debug with replace is allowed.
    both of these clients are on the same instance, same sid so they share client independent information.
    Our security team claims that it's a security risk to allow debug with replace in our Client 300 because someone could change a security profile or something like that.  Here's my question...
    Are you authorized to debug with replace in your development environment and if not, what's the reason you were given?  I'm looking for arguments one way or the other to use as precedent for a meeting.
    Your prompt response is appreciated.
    Dan

    Hi
    I think the option can be dangerous in QA or PROD system because you can skip some control and change the data normally can't be changed.
    A classicl example is trx SE16: by debug you can change directly the data of the most of tables.
    But I don't believe can be a risk in development system, in this enviroment the developer should have no limit, otherwise to work and test can belong very hard.
    Max

Maybe you are looking for