Logic in prototyping - conditional behavior, branching, if/then
To be able to prototype for usability testing and demonstrations there needs to be a bit more intelligence around how experiences are joined up togehter.
If clause example:
If user makes choice a, do x. If user makes choice b, do z. And so on.
When user makes a choice/clicks/fills in a field etc. assign a variable. Then allow designer to use variables in an if-clause to make decision which roots to go down.
Thank you :)
Example: when using a 'back' button, it would be great if the prototype knows where you came from so you will be sent back to the correct previous page.
Adam Trabold commented
OH MY GOD this would be incredible. Would avoid so much duplication / multi-link mess when wanting to present prototypes.
Matt Talebi commented
It will be great if we can soon add logic with states.
"IF checkbox1 or checkbox2 or... state is checked THEN action button state change to visible"
Something like this :)
Jerimy Brown commented
We need this for maintaining component states when autoanimating to another artboard as well
Manuel Ryan Espinosa commented
I agree. This would be nice.
Ashleigh Wallbank commented
It would be handy to be able to give an artboard a different state.
At the moment I have a prototype that depending on which artboard you come from a button goes to a different place. This means I have to have multiple copies for the EXACT SAME artboard just to give something a different destination/function.
Having multiple states means I could go from artboard-1 to artboard-2-State-1, and my button would go to artboard-3, and if I went from artboard-4 to artboard-2-State-2 the button would go to artboard-5, not artboard-3.
Like on proto.io
Jonathan Boice commented
The ability to create a true Drag n Drop Interface, or reorganisable elements.
For example create a list the can be move, and allow another item to move above or blew.
This could be part of a new functional overall call "Behavioural Conditionals"
What are Behavioural Conditionals?
Just like you apply swipe left, right up, down or add timer to screen or elements, Behavioural Conditionals. are behaviours that can be applied to elements in the screen, for example it can be moved, or react to sound, to transform between two states based on a variable. a good example might be you design two UI's, one in dark mode and one in light, you can add a Behavioural Conditional, of switching, if ambient light sensor is above or blew a number, or based on time of day.
I strongly believe their is a range os these that make a huge difference, and will set Adobe XD apart from other tools.
Lucian Cicos commented
Facebook Origami has an interesting way of handling this. https://origami.design/tutorials/common-interactions/Adding-Logic.html
This logic added, is a MUST HAVE.
its very hard designing in XD all possible stages without this logic. Just take as example a simple "Account"
User is signed in or not? the design and content are totally different.
Tomasz Czarnecki commented
Please consider adding Conditional Statements in Prototype Mode.
I imagine this function working somehow as shown on image.
When in prototype mode it would be possible to change Simple Boolean values for example by 1st time visiting page (or other action).
When for example Tester visits Login Page once, it would not appear again in Prototyping Session (it changed its Boolean value from Unvisited (false) to Visited (true).
Gonzalo Figueroa commented
This is a need in order to compete with Axure RP or other softwares that allow you to reduce the amount of screens needed just by using variables. We use a lot of complex prototyping and conditions as of today and not having it is blocking us from moving 100% to XD and drop Axure.
Vick Sleiman commented
Conditional logic is a MUST if you want to create more complex prototypes. The existing setup works well for 'Dribbble designs' and very simple apps, but with the use-cases that we're dealing with in our company, it's impossible to create a functioning prototype without variables and conditional logic. We currently use 'Just in Mind', but as Adobe users and followers we would obviously love to switch to an Adobe tool that can do just as much. Fingers crossed something will be included in the next update!
Mahmoud Hijazi commented
Let's try and create a journey trigger, where the user can create different journeys in the prototype section, and trigger them on action e.g. when user reaches this page or when user does this action start this page, or when this journey ends revert to this page. I believe this could open a great door for people who do testing on big projects such as my self where i need to create a big project and test different aspects without having to switch file all the time.
Really really waiting for variables management, to make the user flow easier, with fewer artboards, and expand the possibilities of interaction, with multiple navigations.
In my view, this is the single most valuable feature in any prototyping tool. Without this, I consider XD as just an eye candy tool like so many on the market today.
I would like to be able to apply conditional to an animation.
Example: When you click on certain button, depending on the screen, the action should take a particular screen
Grant Howarth commented
This would be great and hopefully the step needed to stop me having to use Axure for prototypes requiring logic.
H. Postma commented
For XD to be useful for any game designer, it must have logic, conditional statements in any form so that a prototype can show some form of gameplay.
I object to my idea (logical operators for voice triggers that are in the trigger syntax) being merged with this post.
- My idea is low-hanging fruit that could be implemented very quickly.
- The post my idea has been merged with is on a GENERAL solution to logic, which may be months or years away from being implemented
Koen van Niekerk
It would be great to have logical operators (AND/OR/NOT etc.) for voice triggers.
- Suppose your prototype asks your user to choose from 3 options (e.g. flavors)
- Suppose only 3 options are available (Strawberry, Chocolate and Vanilla)
- Suppose the user responds (voice) with something else than these 3 options
- Suppose you want your prototype to respond "We don't have that, please choose between Strawberry, Chocolate or Vanilla"
The amount of "wrong" responses is infinite, so you cannot make a trigger for the whole dictionary. But what if:
You can combine voice triggers in an OR function:
trigger : voice
command : strawberry OR chocolate OR vanilla
voice response : coming up!
And cover all other scenarios in a NOT function:
trigger : voice
command : NOT strawberry NOT chocolate NOT banana
voice response : I did't get that, please choose between strawberry, chocolate and vanilla
Possibilities would be almost endless!!
BTW the prototype I attached ONLY responds to the 3 flavors. Saying something else does not trigger a response...
Koen van Niekerk
UX Director, VanBerlo