Affected: All SDKs
Overview
This topic explains how to convert a list of numeric values to a string format in a feature flags targeting rule. When adding values to a rule condition using the is one of operator, LaunchDarkly interprets input based on the first value. If the first value is a string, the platform will treat all subsequent pasted values as strings, even if they appear numeric.
Cause
This issue occurs when creating a custom rule targeting the key attribute.
Solution
To bulk convert numeric values to strings, copy a list from a spreadsheet or text editor and paste it into the values field of your rule. Make sure the first value is a string, either alphabetic or enclosed in quotation marks.
After pasting, you can delete the initial string without affecting the format of the remaining values.
Example 1:
If you paste the following list into the values field: abc, 222, 223, 224, 225, all values will be interpreted as strings.
Example 2:
If you paste this list into the values field: "123", 222, 223, 224, 225, even though most values appear numeric, they are interpreted as strings because the first value is quoted.