question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

use lg instead of expression in value, condition etc.

See original GitHub issue

Use 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:closed
  • Created 3 years ago
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
boydc2014commented, Apr 1, 2020

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

0reactions
cleemullinscommented, Apr 28, 2020

@boydc2014, 7 days ago you said “PR this week”. Can you update this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Being able to use lg custom functions on condition ...
We can create this lg expressions as an lg templates tha... ... use lg instead of expression in value, condition etc.
Read more >
LG-SYNTAX™ USER'S GUIDE: MANUAL FOR LATENT ...
Output from models containing conditional effects (effects that differ across values of another variable, for example, gender) includes an ...
Read more >
LG OLED gaming/PC monitor recommended settings guide
Use your OLED for ~100 hours before assessing uniformity. ... your viewing condition (SDR content in a dark room, SDR in a bright...
Read more >
Working with the Query Language in Altium Designer
This page provides an introduction to the Query Language in Altium Designer and how you can create logical query expressions to target ...
Read more >
Introduction to Algorithms
It was originally inspired by the use of “ell” numbers, written as L(5), which indicates a number that we don't know the exact...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found