apiary shows me how to add descriptions to the parameter. However, what I need is having descriptions on the value.
For example /users{?skills}. I have my own skill codes for this parameter
'1' means can speak English
'2' means can swim
'3' means can drive
Adding them after the parameter description is way to do it. What if I have tones of skill codes? And the formatting of this approach is ugly. How can i achieve it?
There is currently no way to achieve it by using standard instruments of API Blueprint.
Neither
+ Values
+ `A - means something`
+ `B`
+ `C`
or
+ Values
+ `A` means something
+ `B`
+ `C`
will work correctly. I filed a feature request under API Blueprint's repository. If you want to be part of the design process and help us to get the best solution to your problem, you can track it and comment under it.
Appearance
I understand that rendering of this feature isn't very nice in standard docs.
However, in "beta new docs", it looks much better. Try it out - in settings, turn on following switch:
Then the rendering should look like this (two states):
Using tables
When in troubles with API Blueprint, you can always use plain old Markdown in endpoint's description to supplement or substitute what's missing. E.g. you can freely use tables as an addition or replacement to the Values section:
# My API
## Sample [/endpoint{?id}]
Description.
| Value | Meaning |
| ------------ |:----------------:|
| A | Alaska |
| B | Bali |
| C | Czech Republic |
+ Parameters
+ id (string)
Description...
| Value | Meaning |
| ------------ |:----------------:|
| A | Alaska |
| B | Bali |
| C | Czech Republic |
Description...
+ Values
+ `A`
+ `B`
+ `C`
Rendering of tables in old and new docs:
Related
Background Story
I have an excel table of values with thousands seperator . and floating point seperator ,.
If the number is lower than 1000, therefore only the , exists. In UiPath, I'm using a read range and store the data in a data table. Somehow, Uipath manages to replace the , by a . because it interprets the value as float. But this only happens to values lower than 1000. Larger numbers are interpreted as string and all the seperators stay the same.
Example:
+───────────+───────────────+─────────+
| Input | UiPath Value | Type |
+───────────+───────────────+─────────+
| 4.381,14 | 4.381,14 | String |
| 5.677,50 | 5.677,50 | String |
| 605,27 | 605.27 | Double |
+───────────+───────────────+─────────+
Problem
I want to loop through the data table and apply some logic to each value. Because of the different data types, I assign the value to a generic value variable. It is a huge problem that the , is automatically replaced by a ., because in my context, this is a completely different value. Therefore I somehow need to check the data type, so i can replace the seperator again.
Attempt
I'm trying to get the type by GetType().ToString(), but it only delivers me: UiPath.Core.GenericValue
I tried to replicate it. And I have successfully converted to double using the following steps. I have taken one value and followed the below steps.
strValue = dt(0)(0).ToString.Replace(".","$")
strValue = strValue.Replace(",",".")
strValue = strValue.Replace("$",",")
dblValue = CDbl(strValue)
In UiPath, when we read data from Excel, it will be treating the cell values as generic objects. So, we explicitly convert it to String.
I am looking at this line of EBNF:
<zeg> = <zig>|<zag>[<zug><zug>]
Does [<zug><zug>] only become available when <zag> is used, or is it always available, even with <zig>?
The | would be the most-loosely bound thing. In other words:
<zeg> is equivalent to <zig> | (<zag>[<zug><zug>])
and NOT equivalent to (<zig> | <zag>)[<zug><zug>].
So your first interpretation.
I have a large semi sorted list of Strings sorted by only first character. Each String is accompanied by an ID. The first x entries start with letter A then follow entries starting with letter B and so on. Not all letters are necesarily represented.
By semi sorted I mean that there are exceptions (wrongly sorted entries). It is NOT possible to sort the entries in a correct fashion. Already existent entries have to remain at their ID.
I have crafted the follwing example only including starting letters A and B. The entries starting with C, Z and S have been wrongly entered.
Example:
| ID | NAME |
|------|------|
| 6000 | AXXX |
| 6001 | AXZS |
| 6003 | AAFD |
| 6004 | CSDF |
| 6005 | ZSSF |
| 6006 | ASDF |
| 6007 | BXAS |
| 6010 | BZDS |
| 6011 | SHZF |
| 6012 | BHZT |
I want to add entries to the list. A entry with a Name starting with letter A should be inserted grouped with other entries starting with letter A if possible or otherwise at the very end.
In the above example a entry with a Name starting with letter A should be inserted with ID 6002.
A entry with a Name starting with letter B should be added with ID 6008.
I am not sure how to solve this. My first thoughts are to first iterate over the existing list starting with the lowest ID and to save information on the letter group.
Like:
Letter: A StartID: 6000 EndID: 6006 IsFull:False
Letter: B StartID: 6007 EndID: 6012 IsFull:False
And then when it comes to inserting using the above information for the determination of possible IDs of the new entry. After inserting a new entry this information would have to be updated.
However I am not sure on how to exactly achieve this. All I need is some pseudo code for a possible solution so I can write my own code.
You probably want a few steps
find the position of the insertion group if it exists (what if the first few were B, Z, before A?)
find the last member of the group if it exists, otherwise the last member of the prior group (for example when inserting F)
determine if there's room before in the left index after the last member of the group, and before the first member of the next one
if a position exists for insertion, insert the value, else
find the last position
append the value
Some considerations
you must keep track of and consider several positions, some structure will help you with this
if you have runs ordered A,B,Z,C in the left column, does the block with Z comprise a group? is the block C misplaced? otherwise it seems your values should grow wherever the first new member is
"next" needs to consider multiple characters (presumably ABAA comes after AABB)
When I set custom color to some form in Expressions window, the formula looks like
#117be0
or
="#117be0"
So, the question is, how to get string color hex value from dataset that contains the same value?
Something like this
=First(Fields!my_color.Value, "color_dataset")
Well, you kind of answered your own question. Yes, FIRST() will return the first value in the colors dataset. To make this more meaningful, you are going to want to used the LOOKUP function.
LOOKUP(Fields!Local_Dataset_Value.Value, Fields!Color_Dataset_Value.Value, Fields!my_color.Value, "color_dataset")
Lookup will check the value of the Local_Dataset_Value field in your current table dataset, and find a match for that value in the "color_dataset" dataset's Color_Dataset_Value field. When it finds a match, then your color will return.
To explain further, given datasets:
Dataset1
Name | Age | Etc
........................
Joe | 30 | Whatever
and
color_dataset
Color_Name | my_color
.....................
Joe | Blue
then:
LOOKUP(Fields!Name.Value, Fields!Color_Name.Value, Fields!my_color.Value, "color_dataset")
Would return:
"Blue"
I have a huge data set and I want to extract the rows which do not have certain keywords.
For example, let says I have the following data set (two columns):
+--------------+------------------+
| Nylon | Nylon wire |
| Cable | 5mm metal cable |
| Epoxy | some comment |
| Polyester | some comment |
+--------------+------------------+
I want to find the rows which do not contain the keywords Nylon and Epoxy (and other keywords for that matter) and put those rows in another place (i.e. sheet).
Thanks in advance!
Sub a()
With Worksheets(1)
j = 1
For i = 1 To .UsedRange.Rows.Count
If .Rows(i).Find(what:="Nylon") Is Nothing And .Rows(i).Find(what:="Epoxy") Is Nothing Then
.Rows(i).Copy Destination:=Worksheets(2).Rows(j)
j = j + 1
End If
Next i
End With
End Sub
A | B | C
-------------------- ------------------- --------
1 Search Term -> | nylon |
2 Name | Description | Found
3 Nylon | Nylon Wire | TRUE
4 Cable | 5 mm metal cable | FALSE
5 Exoxy | some comment | FALSE
6 Polyester | some comment | FALSE
In the above example, I would create an AutoFilter on A2:C6 with the first row being my headers. In each cell in C3:C6 I would have a formula akin to (this is from C3):
=OR(NOT(ISERROR(SEARCH($B$1,A3))),NOT(ISERROR(SEARCH($B$1,B3))))
Now, you can use the AutoFilter tools to filter for those where Found is true.
I'll show how you can check if one string is within some other columns, returning a boolean. Then, you'll need to decide how to handle the positive cases. I believe you'll use a VLOOKUP or something like this.
Please, replace ; by ,. I'm not using English regional settings ATM.
You can combine FIND and ISERROR function to find your result. ISERROR returns a boolean, and you can combine several column checks as much as you want.
Example:
Let's say you have the test keywords in cells C1 and D1, and the range you provided above starts at A2.
Now, we can add into C2 a testing to check if the string Nylon exists within A2, that is =ISERROR(FIND(C1;$A$2)). We also need to check if the string Nylon exists in B2, then we add the second condition: AND(ISERROR(FIND(C1;$A$2));ISERROR(FIND(C1;$B$2)))
As we're testing if the FIND function returned error or not, it means that our function will return false when the string has been found. To be easier to understand, I believe that's better to add a NOT condition in our formula, then in case the string in C1 appears in A2 or B2, our function will return TRUE:
=NOT(AND(ISERROR(FIND(C1;$A$2));ISERROR(FIND(C1;$B$2))))
Then, we copy this formula one cell to the right to test against D1 value, Epoxy.
Now, that's the result structure:
Nylon Epoxy
Nylon | Nylon wire | TRUE | FALSE
Cable | 5mm metal cable | FALSE | FALSE
Epoxy | some comment | FALSE | TRUE
Polyester | some comment | FALSE | FALSE