How do I make a number to equal another number in dialogflow? - dialogflow-es

is there a way to get a paramater to be equal a different number?
for example - user entered the number "2" when asked to choose a number.
I want the bot to return the answer "your 2 is equal to 120"
and so on.
so the text will be "your $number is equal to $indexnumber"
I know that there isnt a way to calculate in dialogflow, but maybe an index can bypass that somehow.
that I can make a list where a number == another number depends on the user input.
thanks!
Dex.

You'll have to setup fulfillment to process parameter values. See this tutorial for how to setup fulfillment: https://dialogflow.com/docs/getting-started/basic-fulfillment-conversation#enable_webhook_in_dialogflow

Related

gravityform get the "key" instead of "value" of a multiple checkbox submitted form?

I try to explain my problem. Fast question is at the bottom, here I'm just explaining the more detailed I can
I have a gravity form with some questions, 2 of these are multiple choice checkboxes.
I'm assigning a numeric value to each of the answer, for example:
by default the choices are
first choice
second choice
third choice
if I check the "show values" option, by default the value is the same as the key, so basically
"first choice" = "first choice"
and so on.
I want to assign different scores to each choice:
For example:
first choice = 1
second choice = 1
third choice = 2
to be able to sum them up I'll set up an hidden numeric field with calculation enabled and sum the results based on what they checked, using merge tags
Let's suppose the above example is a field with id 25, I would do something like this to get the sum of those numeric values
{:25.1} + {:25.2} + {:25.3}
this is perfect because like this the hidden field will populate accordingly, and I will be able to see the total score on the admin-side... but at the same time I will not be able to see the answers they've chosen, because they will be numbers (corrisponding to the values I assigned before) and since most of them have the same value I'll not be able to know which answers were selected..
So the output on the admin side would be something like:
For example: //this is the name of the question
1
1
2
Long story short: I need to find a way to display on the admin side the chosen answers by their keys, and not by their values.. (while being able to perform a calculation with some scores I assigned) Any suggestion?
Thanks,

Excel formula on cell for valid password

I'm creating a template for importing users in bulk to the system, one of the columns requires to input password,
I would like to create a condition on the [password] cell, in order to indicate to the person that input the details that the password is valid
those are the conditions:
Password must contain at least
6 characters
1 symbol
1 number
1 letter
This is what I tried : MEDIAN(6) AND (OR),EXACT(LOWER()))) but no luck.
all the symbols are valid but the values of the characters must be in English
is it possible?
A password-validator immediately screamed 'regular-expressions'. Will you want to go down the path of VBA, you'd require the following pattern:
^(?=.*?[!#$])(?=.*?[A-Za-z])(?=.*?\d).{6,}$
See an online demo
To mimic this in relative easy native functionality you could go with xpath-expressions:
=NOT(ISERROR(FILTERXML("<t><s>"&LOWER(A1)&"</s></t>","//s[translate(.,'abcdefghijklmnopqrstuvwxyz','')!=.][translate(.,'0123456789','')!=.][translate(.,'!#$','')!=.][string-length()>=6]")))
translate(.,'abcdefghijklmnopqrstuvwxyz','')!=.] would mimic the positive lookahead for any letter;
[translate(.,'0123456789','')!=.] would mimic the positive lookahead for any number;
[translate(.,'!#$','')!=.] would mimic the positive lookahead for any symbol (as given in the character class);
[string-length()>=6] would mimic the 6+ characters needed for valid input.
Well, I have done this in the few minutes between posting the comment and this answer, you can expand it to include whatever other conditions you want:
and(len(A1)>=6,MAX(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},A1,1),"")))
is the formula used in the data validation. Youi can see that A1 meets the length >=6 but I have not controlled that the count of numbers, hiowever you can add that.

Need to use blockly to answer, I will attach the link to the website. Can not use "if" block and equations. Need to use loop. Thank you in advance

Design a program to find the total of all integers from 1 to a number specified by the user. The program should ask the user for the number, and then calculate and display the total from 1 to that number. The output message format is ‘The total from 1 to 5 is 15’ where the user enters the number 5, and 15 is the calculated total.
Can only use "Math" "Text" "Logic" "Loops" and "variable"
Website for building:
https://blockly-demo.appspot.com/static/demos/code/index.html
i use this site to create the blocks https://developers.google.com/blockly
because i have problem with link you put
but i they have the same future.
this is the answer :

Two or more identical parameters in one sentence

I have a dialogflow intent which includes different parameters.Shown as below:
1.png
I set generic "number" for all number parameters such as "Years to Average Principal" and generic "percentage" for all percentage parameters.Like this:
2.png
When I say something like "Change vacancy rate to 56%" or "change Years to Average Principal to 5", it works well.But when I say a sentence which includes two or more parameters with same type, it sets the first value for all parameters.I used the "Change depreciation percentage to 30% and down payment to 45%" phrase and the result is following images:
3.png
4.png
As I have to use only one intent and one action,would you please help me what should I do to have separate values for different parameters?
I hope I could make it clear. Thanks in advance,
Good try using the "is list" setting for a parameter! Unfortunately, you only set it for one of the parameters, so it treated that as the list and then used the first matching value for the other parameters since both matched the rule for percentage. If one was for percentage and the other for currency, it might have worked better, but probably not.
Two (untested) thoughts about how to get this to work (and it is a good attempt to solve the problem of entering multiple values at a time):
You can try to see if setting all the other parameters as lists will work as well. But this still might have the problem of setting one parameter to a number and the other to a percentage.
Look into Developer Composite Entities. This will let you create a composite entity that contains both the name and value and treat it as a single Entity. Then you can specify, in your sample phrase, that you will accept a list of these Entities.

Excel RANDBETWEEN as a string

How does one use a string value as a random value, I have 3 values namely SMS, Datasynergy and Other, i want to simulate live data by using the random function to assign one of the aforementioned value to my field at random?
The way i thought of it is to make a random value between 1-3 and and then go on to say if 1 = SMS else if 2 = Datasynergy else Other
But im pretty sure there must be other ways of doing this?
Thanks in advance.
try this
=CHOOSE(RANDBETWEEN(1,3),"SMS","Datasynergy","Other")
Another way is to use INDEX, e.g.
=INDEX({"SMS","Datasynergy","Other"},RANDBETWEEN(1,3))
which you can easily adapt for a longer list like this
=INDEX(List,RANDBETWEEN(1,COUNTA(List)))

Resources