use lg instead of expression in value, condition etc.
See original GitHub issueUse this query to search for the most popular feature requests.
Is your feature request related to a problem? Please describe. I’m always frustrated when I have to write long expressions and copy-paste common expressions.
For example, convert a set/map to list with index:
=select(indicesAndValues(user.taskLists[dialog.listType]),iter,setProperty(setProperty(setProperty({}, "Id", iter.index),"Topic",iter.value.content),"IsCompleted",iter.value.checked))
It is very long and the conversion function (data structure to structure with id) has to be copy-paste everywhere
Describe the solution you’d like Use lg instead of expression to unblock the following scenarios: Reuse common functions
# Convert(index, value)
- ${setProperty(setProperty(setProperty({}, "Id", index),"Topic",value.content),"IsCompleted",value.checked)}
# GetList(listType)
- ${indicesAndValues(user.taskLists[listType])}
Shorten expressions
=select(GetList(dialog.listType),iter,Convert(iter.index,iter.value))
Describe alternatives you’ve considered
Additional context Common happened in composer
[enhancement]
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (14 by maintainers)
Top GitHub Comments
I think I’ve seen such an issue somewhere before in SDK repo, that a user is asking for using LG to customize functions, and also seen user in Composer side asking similar thing.
I don’t know about this, feels weird to enable LG to do this, given the scope of LG is “language generating”, but at other hand, deal with long or customized expression or reuse expression is easier in LG, @vishwacsena @tomlm any thoughts
@boydc2014, 7 days ago you said “PR this week”. Can you update this issue?