Conditional rendering in exacttarget - rendering

Does anyone know if it is possible to execute conditional statements in Exacttarget?
For example, if x variable === y, render image 1.
if x variable === z, render image 2.
This is fairly out there and the docs doesn't cover it, so I'm just crossing my fingers here

It is, its called Ampscript. You can do all your basic rules and lookups with this. doc link
%%[IF expression1 <comparison operator> expression2 THEN]%%
[wrapped script or email content]
%%[ELSEIF expression1 <comparison operator> expression3 THEN]%%
[wrapped script or email content]
%%[ELSE]%%
[wrapped script or email content]
%%[ENDIF]%%

I found a relevant question on Stackoverflow:
Conditional Formatting in ExactTarget Personalized Subject Line
Which lead me to find: https://help.exacttarget.com/es-US/documentation/guide_template_language/built_in_block_helpers/
Question answered! :)

Related

Algolia vue-instantsearch : disjunction between two distincts facets

Using algolia vue-instantsearch, i’m encountering a special case and i’m having an hard time finding a solution.
Refinement behaviors is that you get the results that matches all your refinement filters.
If i filter on a brand and a price, i’ll get the results that matches both the brand and the price.
I need to add some specific filters that work differently. I would like to be able to say “returns me the results that matches either refinementA, or refinementB, or refinementC.”
The reason is that those refinements are checking fields that are not present on all the products.
If i check a value for refinementA, i want to keep all the results that has no value for field corresponding to refinementA, but remove those that has a value for refinementA that does not match with the one i filtered one.
Im thinking about handling myself some inputs instead of ias-components, and modifying by hand each query that is send to algolia by checking the value of my own inputs when searchFunction is triggered (https://www.algolia.com/doc/api-reference/widgets/instantsearch/js/#widget-param-searchfunction).
I did not found yet how i can trigger a search from an non-vue-instantsearch input event, and i’m not sure how the above solution could affect the internal working of vue-instantsearch.
I’m looking for feedbacks about a more standard way of doing this, or for any advices !
I got the answer by exchanging with a vue-instantsearch maintainer.
vue-instantsearch does not provide any option to do it.
A workaround is to overwrite algoliasearch search method, that is used under the hood by vue-instant-search.
const client = algoliasearch('', '');
const originalSearch = client.search;
client.search = function search(queries) { ... }
More informations in this github issue : https://github.com/algolia/vue-instantsearch/issues/1102

How to switch to an iframe whose id is stored in a variable in karate? [duplicate]

Api returns a confirmationNumber, which i'm storing in a variable then using that confirmationNumber to click and assert on the UI page.
def myFeature = call read('Feature1.feature')
def confirmationNumber = myFeature.confirmationNumber
//some ui login steps are here
Then input('#paymentNum',confirmationNumber) //--successfully entered confirmationNumber
And assert exists('{div}confirmationNumber'). //--not successful. not able to read the stored value
And click('{a}confirmationNumber') //--not successful. not able to read the stored value
Please help
Thank you
Easy. Think of anything within the ( and ) as pure JavaScript. Also please note the extra exists, hmm maybe I should re-design that part of the API - and thanks for asking this question ! https://github.com/intuit/karate/issues/1148
# this is how to use exists() right now, but I have decided to change this !
And assert exists('{div}' + confirmationNumber).exists
And click('{a}' + confirmationNumber)

Vee-Validate: Dependent dropdown with multiple conditions

I have three dependent inputs ways for my form that requires validation.
First Dropdown
Second Dropdown
Third Free Text
I need help in implementing the required_if condition as the syntax is a bit confusing to make put it to work, and resolve the following
When [Issue Category] has the value 'Other (Enter Detail)', then [Issue] needs to be disabled, [Detail] field becomes required.
When [Issue] has the value 'Other (Enter Detail)' then [Detail] field becomes required.
v-bind:key is required for the second dropdown, but unsure how to use a number to remove the error that appears in the console.
CodeSandbox
First, please include the relevant code in your question in the future. The Code Sandbox is great, very helpful, but on Stack Overflow, the goal is to be able to find answers within the site (not needing to leave it to view parts of the question or answer).
You don't need to use required_if. Instead, use the object form of v-validate like so:
<b-input
type="textarea"
v-model="item.detail"
v-validate="{'required':(item.issue_category == 'Other (Enter Detail)')}"
name="detail">
</b-input>
For your other problem, it's essentially the same except you also forgot to give the select a name which is required. Also don't mix HTML5 required attributes in there, I don't think it helps:
<b-select
v-model="item.issue"
name="Issue"
v-validate="{'required':(item.issue_category != 'Other (Enter Detail)')}" >
That's it! See a working example here.

Show content based on whether the user has certain tag in Mailchimp

I went through the Merge Tags here and here, but couldn't figure out the syntax that would allow me to show content based on whether the user has certain Tag or not.
Help?
My goal in case it helps:
User subscribes, and is queued for a welcome mail one day later. In meantime that user may get tagged (my way of segmenting them), and so, the next day when that user receives the welcome mail, the content needs to be catered based on the tag that user got.
Got a response from their support saying
merge tags do not work with Tags just yet
here's the whole thing:
While we do have conditional merge tags available, I'm afraid we do
not have any that would work with Tags. To be transparent, Tags were
recently added a few months ago, and there are some features in our
application that has not updated to work with Tags just yet.
Because conditional merge tags do not work with tags yet, the best
option would be to create multiple automations and send them out based
on each tags. If you do it that way, you'll be able to target those in
specific tags with specific content
Dug a little deeper from the first link. There is another link Use Conditional Merge Tag Blocks which contained the below code:
Name
IF-ELSE
Definition
Use ELSE to indicate alternative content to display if the *|MERGE|* tag value is false.
Example
*|IF:MERGE|* content to display *|ELSE:|* alternative content to display *|END:IF|*
Name
ELSEIF
Definition
Use ELSEIF to specify a new *|MERGE|* tag to be matched against if the first *|MERGE|* tag value is false.
Example
*|IF:TRANSACTIONS >= 20|* Enjoy this 40% off coupon! *|COUPON40|*
*|ELSEIF:TRANSACTIONS >= 10|* Enjoy this 20% off coupon! *|COUPON20|*
*|ELSE:|* Enjoy this 10% off coupon! *|COUPON10|* *|END:IF|*
More examples with definitions can be found here.
Hope this is the answer you were after.

true/false logic in exclusive gateway - camunda bpmn

I am working on Generated Task Forms, I am trying to apply true/false logic in exclusive gateway. If true, end process. If false, redirect to data correction task.
<bpmn:sequenceFlow id="SequenceFlow_180tuqy" name="Yes" sourceRef="ExclusiveGateway_1gplnrv" targetRef="EndEvent_16krmz0">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${approved}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1" name="No" sourceRef="ExclusiveGateway_1gplnrv" targetRef="stock_management">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${!approved}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
here ${approved} -> approved is the id of the boolean form fied, but it does not work.
what I need to mention in bpmn:conditionExpression?
First:
I´d like to ask if you write the BPMN-File yourself? Because there´s also a tool for it:
https://camunda.org/bpmn/tool/
Second:
On first sight I can´t see where there would be a problem. It looks ok to me. Often Camunda has problems with variables in conditions.
Try to write ${approved == true} instead of ${approved} and ${approved == false} instead of ${!approved}. If this doen´t work, maybe the problem lies elsewhere.
EDIT:
May you please explain what exactly happens, when quote "it does not work"?