Jump to content

ilona

Registered Users - Approved
  • Posts

    26
  • Joined

Converted

  • FusionPro Products
    Yes

Converted

  • FusionPro VDP software version
    9.2.30

Converted

  • OS
    Win 7

Converted

  • Acrobat Version
    Acrobat X (10)

ilona's Achievements

Explorer

Explorer (4/14)

  • First Post Rare
  • Collaborator Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

10

Reputation

  1. Hello! Does anyone know if there is an FP rule that replaces text in a text frame? Here is what I'm trying to accomplish: op1=Field("xyz"); if (op1!="") { FindTextFrame("abc").value=op1; } I was hoping that the above would replace the "value"(the actual text) in the frame with whatever is in op1, but it doesn't... I wonder what the "value" property of a text frame is then... I can't use a simple return statement. This rule is in onRecordStart, and it's more complex than the above, but it's essentially what I need. Any ideas?
  2. True, I could return the value, and then see what gets displayed in the preview in MCC. The GetFileName function really is all I should ever need. Why the need to know the details then? Pure curiosity...and just in case I ever find myself in the unfortunate 1%. I suppose my question here was related to the input data and UI Rules in MarcomCentral vs. resources and FusionPro(yes, Desktop) rules. For example, if I have a rule in FP that looks at a text field A, and if the value in A is "green", then it returns a resource green.jpg for some graphic field B. Then, I go ahead and create a UI rule in MCC that contradicts the FP rule, for example a "Cascading Drop-Down" where if A has a value of "green", then the graphic field B is "blue"(which would be some image blue.jpg). Who wins here? What will be displayed in the MCC preview for the customer? Of course I could simply test this case, and see the results myself, but what I was looking for is more so a general answer where either MCC overpowers FP rules or vice versa no matter what the rule/case is....or does it simply depend on what evil contradicting rules I come up with(meaning case-by-case basis)? I suppose I already have the answer to that: Thanks for answering my confusing questions...watch me be back with more.
  3. That's what I needed... As suspected MCC adds some additional info that gets returned as the field value. In my rule in FP, I replaced: [color=#696969]var img= Field("Gfieldname");[/color] with [color=#696969]var img= GetFileName(Field("Gfieldname"));[/color] and... it works like a charm... Thank you...Much appreciated! I still have two questions: 1. Could you(or anybody else) give me an example of an actual graphic field value in MCC? For example, let's say I have a graphic field named XYZ, and I select a gallery image in MCC which is mypic.jpg for the XYZ field. When I click on the preview button in MCC, what does my field value in the XYZ field become? In other words, what value is getting passed to the GetFileName function? 2. As far as the overriding question: does MCC override FusionPro rules or does FP override MCC selections? Or is it all on a case-by-case basis?
  4. What actual value(after selecting an image) does any graphic field have in MCC? Here is what I'm trying to accomplish: In my template(FP) I have a rule that looks at a graphic field's value, and then returns the name of that value as a string. For example, if the value is "<p>somepic.jpg</p>", the rule returns only the name part: "somepic". Then another rule uses that name to display a resource. The return statement is this: new=somepic+'.pdf'; return Resource(new); The second rule simply displays a resource using the name of the jpg that is used for the first graphic field. This works all great in FusionPro, but it doesn't work in MCC. Both graphic fields in MCC are using library images. My first guess is that maybe the value in the first graphic field is not what I expect it to be. Is the value of any graphic field in MCC the "display name" that gets assigned in the library or the actual image("somepic.jpg" for example)? Also, does MCC override FusionPro rules or does FP override MCC selections?
  5. I got it to work. I was just missing the two forms. I guess it helps if you read the tutorial first... Thanks!
  6. Here are my columns: Product Name, Product ID, User Context ID, Template Field, Value, Quantity, Customer Cost, Seller Cost, Fee Type, Active. There is no "Priority" and the 3rd column is "User Context ID".
  7. Here is the error I'm getting when I try to upload a spreadsheet with dynamic pricing: "- User Context ID does not exist". The User Context ID is blank for all records in the spreadsheets(in order to have it applied to all users). What am I missing? Thanks!
  8. That's exactly what I needed! We actually do have iForms activated, but I couldn't find any info on the usage(except for the forum threads). Thanks for the link! I will probably be back with more questions once I start playing with the pricing...
  9. It is a versioned product, so I guess iForms is the way. Thanks David!
  10. How do I set up different pricing that depends on a drop-down selection? Let's say a drop-down has two values: A and B. If they select A, the pricing is $1, but if they select B, then the pricing changes to $2(lot pricing).
  11. I'm glad that RawTextFromTagged function(that includes special characters like &amp) will be available in FusionPro 8.1. When I did my little research the other day, I only found TaggedTextFromRaw and, as you know, I had to implement the reverse myself. Let me explain exactly what MCC is doing... MarcomCentral is not applying formatting to all the fields. I have it set to apply the formatting to the label fields and the number fields. Why? It's because the user is supposed to have different font formatting available to select from. He/she inputs a phone number, selects font face & font color for the label and the number fields(the two(face&color) drop-downs are set to apply the formatting to all the label and all the number fields). The labels are generated automatically once phone numbers is typed in -that's what the "if phone number not empty, display label + number" rule is supposed to do. Why don't I apply the formatting drop-downs to the label fields only and have numbers as tag free fields? This works just fine in FP as the formatting from the label field gets applied to the whole line(labels and numbers that follow), but it doesn't work in MCC. In MCC the preview displays the selected formatting for labels, but the formatting is not carried over to the phone number that follows the label. It just keeps the formatting the was used in the VariableTextEditor for the number field. I am not sure why that's the case, but because of these differences in behavior between FP and MCC, the OnRecordStart functions don't work correctly either. I used your code, and again, it works just fine in FP, but doesn't work in MCC. I even modified it a little to have it do exactly what I need it to do: function StripTags(text) { var start=-2; var end=-2; var sub=0; var stripped=""; var loopend=text.length; for(i=0; i<loopend; i++) { if (text.indexOf("<") > -1) { start=text.indexOf("<"); end=text.indexOf(">"); sub=(end+1)-start; if (start=="0") { text=Right(text,text.length-sub); loopend=text.length; } else { stripped=text.split('<')[0]; return stripped; break; } } else { stripped=text; return stripped; } } return stripped; } function CheckIfEmpty(text,label) { if (text=="") { return ""; } else { return label; } } var phoneFields = ["TollFree", "Direct", "Cell", "Fax"]; var labels=["TollFreeLabel", "DirectLabel", "CellLabel", "FaxLabel"]; var val=""; for (var i in labels) { val=CheckIfEmpty(StripTags(Field(phoneFields[i])),Field(labels[i])); FusionPro.Composition.AddVariable(labels[i], val); } I will definitely be using the OnRecordStart and the functions available in the future(and variable injection - thanks for introducing the concept to me), but it looks like in this specific case the 8 rules that I created before are the one and only solution that works the same way in both FP and MCC. Thanks again for all your help!
  12. Unfortunately, that will not work in this case(works perfectly in FP, but not in MarcomCentral -that's what my initial post was all about) because font formatting gets applied(the user makes a selection from a drop-down) to the Field("Cell") in MCC. When that happens the rule sees the field as not empty - once a font is selected, the field becomes a string with font tags which makes it not empty. That's why I created a rule to take away the tags and return the remaining string(empty or not)...the returned string is then compared exactly the same way you have it(except I add the '<t>'+Field in the Variable Text Editor instead of having it in the rule itself)...it all seems to work just fine.
×
×
  • Create New...