I have two entities 1. Product list, 2. Price list,
When user search product? I want to extract product & price both entities from a single word. How to achieve it ?
For example..... I have one list of product ( Laptop, LCD, Monitor) and another for price ( $ 50 , $ 44, $ 300 )
when user search "do you have laptop", I want to extract value "Yes we have laptop for $50"
Here is both entity picture
This is price entity picture
This is product entity picture
This is intent picture
Expected Response picture
Getting This reponse picture
You are getting this response because you have assigned product value for price.
.
Your price entity is wrong. There is a rule in dialogflow as mentioned in the attached picture
Related
Let say I have a dataset of car selling. I want to rank each car product for its category.
Right now, I can get this by using this formula.
=rank(C2,filter(C$2:$C,B$2:$B=B6))
This formula works fine, except that I have to copy this for each row. I see an array formula, but I can not figure out how to use it.
Here is the
Sample Workbook Car Selling
Try
=arrayformula(iferror(VLOOKUP(row(B2:B),{sort({row(B2:B),B2:C},2,1,3,0),row(B2:B)},4,false)-MATCH((B2:B),QUERY({sort({B2:C},1,1,2,0)},"select Col1"),0)))
explanation
1- the key to the solution is to play with a virtual database sorted by cotegory and value where I add the current row after sorting
{row(B2:B),B2:C},2,1,3,0),row(B2:B)}
I will search within this virtual database for a "global ranking"
=arrayformula(VLOOKUP(row(B2:B),{sort({row(B2:B),B2:C},2,1,3,0),row(B2:B)},4,false))
2- the second step is to work with the only category within the same sorting process
QUERY({sort({B2:C},1,1,2,0)},"select Col1")
and retrieve the first line where the category appears
=arrayformula(iferror(MATCH((B2:B),QUERY({sort({B2:C},1,1,2,0)},"select Col1"),0)))
3- and at the end you subtract the two values
I am developing an API and would like to validate phone numbers and, if valid, extract their country code and area code without knowing the region ahead of time? Possible?
Just discovered https://www.npmjs.com/package/libphonenumber-js and looks promising.
'use strict';
const libphonenumberJs = require("libphonenumber-js");
const phoneNumber = libphonenumberJs.parsePhoneNumberFromString('Phone: 8 (800) 555 35 35.', 'RU');
const countryCode = phoneNumber.number.replace(phoneNumber.nationalNumber, '');
console.log(phoneNumber.number, countryCode);
// +78005553535 +7
If you want to do it from scratch, you can follow the following strategy.
You can create a database table, for example you can call it valid_country_phone_numbers. And of course in this table you will insert names of different countries and their country codes, without forgetting insert the length of the phone numbers in that country.
And you can have fields like:
country,
valid_phone_number_length,
country_code,
I don't know the database that you are using otherwise I could have also displayed the logic.
And on the frontend you can ask a user to choose his/her country and then enter their phone number.
To determine if the user has entered valid phone number. You can use the information in the database. For example, what you can do is find the country name in the valid_country_phone_numbers database table. And then compare the country code if necessary and after that compare the phone number length.
But this will be very difficult if you don't know the country of the person. Otherwise you can take advantage of html 5 Geolocation feature. See more here
If you want to know something different, let me know.
I have a table with an Appointment ID, code, and lab text. I want the fourth column to display the percentage of how often the text field is used based off the code column per appointment.
For example, whenever a code of 123 is used, (it's used on 2 unique appointments) 'lipid panel' Lab Text is present both times. So i want 'lipid panel' to be 100% whenever 123 is used. 'Occult Blood' is used on only 1/2 appointments where there is a code of 123, so I want it to be 50%
Use this:
=(COUNTIFS(B:B,B2,C:C,C2,A:A,"<>"&A2)+1)/(SUMPRODUCT(($B$2:$B$10=B2)/(COUNTIFS(B:B,B2,A:A,$A$2:$A$10)+($B$2:$B$10<>B2))))
Context:
I have a excel sheet with the address and contacts of customers and the product they purchased.
I use Mail Merge to insert the address and names of the customers to word in the format I wish and then print it for shipping.
The actual problem:
We have many different products and to every product we have a specific description. With every order I want to include the description. How can I use mail merge to print the address and name of the customer and in the same moment also the description of the product on the second page?
Every product has a unique and specific product number.
To every product there is a description, labelled with the product
number.
Every description is in a separate Word file.
Any ideas? Thanks!
I currently have a SharePoint list with a column called body filled with email body.
Example, I send an email to the list with the following details in the email body.
Name: Adam
Age: 24
Country: Canada
Those details will then be saved as multiple lines of text in the list column body. Is there any way for me to extract name, age and country from the column body and insert it into another list where name, age and country will each be their own column? I only have SharePoint Designer and do not have access to the server for backend coding.
To provide details on Boland's e-mail I suggest you do the following:
Provide a delimiter for the data that will be saved in the body column. (eg. | or ;, so it will look something like Name: Adam | Age: 24 | Country: Canada
Create a SharePoint Designer Workflow like what Boland mentioned, to fire every time an item is added in your list.
What the workflow does is the following:
Create three variables (for your example) which will hold the values for Name, Age and Country
Use the delimiter together with the Substring action to get the values for Name, Age and Country to assign it to the variables you created.
Call the Create List Item action and pass the three workflow variables you created
Let me know if you need more details so I can clarify my answer more.