Hi,
I think this is very basic but I can’t seem to find a resource to help me.
I need to create a validation scenario for my business where my customers can input a organization number. This is number should always be 10 numbers. Sometimes people will write 10 numbers with a dash in the series. I want to find a way to first filter out -(dash) if it exists and then green light any value with 10 numbers.
Appreciate any help. Thanks.
Hey @Barry_B
Welcome to make community
You can use filter “numbers” contains (dash).
Or you can simply replace your dash with empty string
Thanks for the quick response @ManishMandot . I am not quite sure what to do with that though. I am quite fresh to make.com.
What module should I have between the trigger containing the value and the filter?
I understand what you mean be setting the filter but I have no clue how to use it after
Welcome to the Make community!
Here, you just need a simple filter:
Module Export - quick import into your scenario
You can copy and paste this module export into your scenario. This will import the modules (with fields/settings/filters) shown in my screenshots above.
-
Move your mouse over the line of code below. Copy the JSON by clicking the copy button on the right of the code, which looks like this:
-
Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the editor.
-
Click on each imported module and re-save it for validation. There may be some errors prompting you to remap some variables and connections.
JSON module export — paste this directly in your scenario
{"subflows":[{"flow":[{"id":230,"module":"util:SetVariable2","version":1,"parameters":{},"filter":{"name":"is valid","conditions":[[{"a":"{{length(replace(229.input; \"/\\D+/g\"; emptystring))}}","o":"number:equal","b":"10"}]]},"mapper":{"name":"output","scope":"roundtrip","value":"{{replace(229.input; \"/\\D+/g\"; emptystring)}}"},"metadata":{"designer":{"x":381,"y":-2394}}}]}],"metadata":{"version":1}}
Note: Did you know you can reduce the size of blueprints and module export code like the above, using the Make Blueprint Scrubber?
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!
1 Like