Validate text input against property in collection

I have created a custom sign-up form that follows the standard Sign Up screen. After the user account is created, it links to the page below. I have a Users property that controls the Login button link whether they proceed to this screen until it is validated or if they proceed to the home screen because they have successfully validated.

Need help to understand how to validate the user’s input against a Partners collection I have created. In Partners, the first property is a text property named Partner Code. If what the user enters is found in that property in the Partners table, the Continue button is visible. If an invalid entry, I set a visibility condition on a text label that informs them the input is invalid and I do not display the continue button. I cannot seem to figure out how to validate the input against the Partners collection and Partner Code property in that collection.

  1. Set up the input, Create a Text Input called Partner Code Input.
  2. Add a list to validate, Place a List of Partners on the screen. Filter the list so that Partner Code equals the Input Value from your Partner Code Input. Limit the list to 1 item.
    Make the list invisible (set opacity to 0 or move it off-screen). This list is just used for validation.
  3. Control the Continue button, For the Continue button, set visibility to show only when the List of, Partners count is greater than 0. That way, if the input matches a code in the Partners collection, the button appears.
  4. Add the invalid message, Add a text label such as “Invalid Partner Code”., Set visibility so it only shows when the List of Partners count is 0 and the input is not empty.
  5. On Continue action, When the user taps Continue, update the Logged-in User → Partner relationship with the current Partner from the hidden list, Then link them to the home screen or the next screen in your flow.

Hello,

you’re trying to validate a Partner Code that a user enters, against a list of codes stored in a Partners collection, and based on whether it matches, show or hide a Continue button and/or an error message.

Since you’ve created a Users property and are using conditional logic for UI visibility, you’re close. The missing piece is how to query the Partners collection to check whether the entered Partner Code exists.

Best Regard,

Tofu

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.