Conditional Data Design
Learn how to trigger specific data displays in Momen's no-code platform based on various conditions.
Last updated
Learn how to trigger specific data displays in Momen's no-code platform based on various conditions.
Last updated
This tutorial will guide you through displaying different content by setting conditional data. When you need to display different content for specific data or text under different conditions, you can use "conditional data" to achieve this.
For example, if you want to show the membership level description as "Platinum" when a member's points are greater than 1000, "Gold" when points are greater than or equal to 500, and "Silver" otherwise, you can use conditional data.
Configuration Method 1:
In the database, store user information in a personal information table, which includes a field called "points" to record user points.
Configure remote data on the page to request the current user's personal information with a limit of 1.
Add a text component to the page's content and click the "+" button to select "conditional data" in its content.
In the conditional data, add three conditional checks:
The first condition checks if "points" in the remote data are greater than or equal to 1000. If true, the text component displays "Platinum."
The second condition checks if "points" in the remote data are greater than or equal to 500. If true, the text component displays "Gold."
The third condition, set to "Always," will be automatically met if the previous two conditions are not met. In this case, the text component displays "Silver."
Tips:
The order of condition configuration is crucial and should strictly follow a top-down sequence. Changing the order may result in different conditions being met, so it's essential to design the condition checks in the correct order.
Configuration Method 2:
The first condition checks if "points" in the remote data are greater than or equal to 1000. If true, the text component displays "Platinum."
The second condition checks if "points" in the remote data are greater than or equal to 500 and less than 1000. If true, the text component displays "Gold."
The third condition checks if "points" in the remote data are less than 500. If true, the text component displays "Silver."
Momen is a no-code web app builder, allows users to build fully customizable web apps, marketplaces, Social Networks, AI Apps, Enterprise SaaS, and much more. You can iterate and refine your projects in real-time, ensuring a seamless creation process. Meanwhile, Momen offers powerful API integration capabilities, allowing you to connect your projects to any service you need. With Momen, you can bring your ideas to life and build remarkable digital solutions and get your web app products to market faster than ever before.