Make Input field optional
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Team,
I'm trying to take inputs from user basis on which I provide an extract. Issue here is that here all the fields are mandatory but I want to make the input fields optional. Appreciate any help. Please find the sample workflow in the attachment.
- Labels:
- Common Use Cases
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@hemant86
The input Excel is missing, so can not really check the flow. but I noticed below. maybe you can give a try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks @Qiu I have attached an updated workflow and the input file. And are you saying removing the double quote will make the fields optional?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@hemant86
For now, it is working, I think.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Qiu . Its working because I have kept a default value of "00" in Lot no. Please remove the default value and it will ask for "Please enter a value"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @hemant86
The error is thrown by the Filter tool, so you need to change Action(5) so the condition is always correct. If the value in the input tool is blank, the formula in the Filter becomes [Lot No]= so there is nothing to compare [Lot no] to. To fix this you need to change the workflow so the formula in the Filter tool is always correct. In the attached example, I assume that if the user leaves [Lot No] blank, they want to see all the lots.
Action tools always treat their targets as string, so to make the logic in the filter tool work properly, you need two Action tools, both set to Update Value with Formula. The first one changes operand in the filter tool, which is "2". If the input is not blank, the number is put in the place of the original "2". If the input is blank, the "2" is replaced with "-1".
The second Action tool changes the operator in the filter. If the input is not blank, the operator is left as "=". If the input is blank, the operator is changed to "!="(not equals). The end result of these two Action tools working together is that the formula in the Filter is either "[Lot No] = X" where X is the value in the Text Box or "[Lot No] != -1" if the Text Box is empty.
Note: In the formulas in the action tools, the [#1] represents the text value coming in from the connected Interface tool.
Dan
