Better and more consistent IF THEN logic

Aside note : I like the "Experimental - Do not use to do your taxes !" :slight_smile: I wish I could use this excuse to justify my “mistakes”.

No mistakes here, take it in 2nd degree ! Amazing job by the way !

1 Like

hehe, thanks! Had to throw in a little humor since I’m still working out some bugs and calculations could be incorrect at times.

1 Like

Definitely not trying to hijack, but am I reading right that you can’t check multiple conditions with nesting? A lot of what I’m wanting to work on involves comparisons between six values to return the correct characteristic in a certain position. I’m currently doing checks by nesting IFs.

EX: IF(D$13=“TXT1”,‘SHEET’!CELL1,(IF(D$13=“TXT2”,‘SHEET’!CELL2,(… nesting six total checks

That will need to be performed in the sheet, instead or did I read you wrong? Disjointed reading due to work and home responsibilities make it likely I’ll miss things…

Something like what you want to do should be fine. It really depends on the situation. In my example, I’m doing some really off the wall things. Basically I have an inline list acting as buttons with some that can perform up to three different functions depending on a variety of different conditions. Some buttons do one thing, and some do other things. Definitely not typical.

In most other cases, I’ve always been able to accomplish the condition checks I need.

Using your example, it would just be a matter of IF ColD is TXT1 then Cell1, else If ColD is TXT1 then Cell1, etc. Pretty simple in that case.

2 Likes

Finally, I don’t feel alone about IF-Then logic and its limitation.

I have wished this feature/improvement for months as well

image

Saludos Jeff!

2 Likes

Also if then action would be nice, i would not need google sheets and scripts !

2 Likes

I have a case where the conditions possibilities in (compound) actions are too limiting.

First I want to scan a barcode then use this information to decide which route to go: 1) add a new row as the barcode is unknown 2) update the inventory item to being present 3) update the inventory to not being present

Further conditions could be relevant afterwards as well

3 Likes

The reorder issue is a massive pita.

As my apps get more complex I am also running into a lot of situations where I am building multiple ITE columns to do what (in theory) 1 would cope with happily.

There almost needs to be an ITE2 option as a column, because I’m not sure I can see a way they can build out on top of what they have without breaking the current version.

1 Like

I have the impression Glide is no longer prioritizing feature requests for app programmers. Listening to the CEO discuss the vision whilst at the same time watching an ever expanding list of important feature requests (many are repeat requests) I just get the impression the Glide team will not designate this one as a priority. IMHO this request points to a gaping hole in the Glide programing language. It should be a priority. Please tell us you agree. Tell us you will work on it as a priority with an ETA of X weeks (alongside a shortlist of others for full transparency).

Congrats on the shiny new suite of starter Apps for businesses like inventory management or real estate admin apps… but please deliver the long overdue feature requests, like these. What would be great is for you to present back the feature requests sorted by priority for your teams.

A billion programmers is a worthy vision but quality over quantity please.

5 Likes

Agreed. I love Glide and I hate to knock them because they are doing an awesome job…but many features just feel incomplete. We’ve gotten some new and awesome features over the past couple of years. Some have been useful, some have been purely eye candy, but some have also led to unconventional workarounds just to get them to function in a useful way. It feels to me like once a feature is released, it doesn’t get any additional attention and is considered good enough.

In my opinion, the basic core functionality hasn’t changed much in a long time and is lacking in many ways. I’d like to see more focus on building up and enhancing the existing features and functions instead of adding more new stuff that’s about 75% functional.

Some core functionality I’d really like to see some focus on:

  • String manipulation. Padding, Substring, Trim, Replace, etc. are crucial, but very hard to achieve in Glide.
  • Conditional relations, or at the very least, a conditional rollup. There is no way to possibly do a rollup of a value that fits within a limitless range of dates when comparing to a specific date value in each row. Sure you can filter on the front end, but that’s already too late when you need to filter for the rollup. (Relations don’t work when you need to find a range. They only work for exact matches, so a conditional rollup based on a value in each row is impossible. That’s why I think a conditional relation would open a whole lot of doors and cover a wide range of scenarios.)
  • IF logic is inconsistence throughout the builder. In some spots (like filters), it purely AND or OR logic, but not mixed. In others (like an IF column), it’s purely OR/Else logic, and yet in other spots, like Actions, it’s a mixture of AND or OR mixed with Else, but you have to duplicate Actions all over the place if you have to mix AND’s and OR’s (Plus there is no IF logic below the top level in actions. You also have to be very careful about order placement if you have several conditions to work with). I think proper and complex IF logic is absolutely vital to any application. It is the most vital piece of any programming language.
    Trying to do logic like, the below screenshots, in Glide can be an absolute nightmare when trying to conform it to the limited functionality we have…and this is the kind of stuff I do every day…so it seems like it should be trivial.

These types of problems are hard stops for me. Most of the feature requests that have gotten my vote are for these hard stop situations. If I can reasonably work around certain problems, then I don’t worry about it too much, because I can still get the job done. But, some of these core functions seem very crucial to me. Maybe it’s the programmer in me that tries to push the boundaries, but like I’ve said before, some of these things feel like they are so much easier to achieve with actual code. The simplified processes in Glide actually make some things harder to do and much more confusing to understand if you do get it to work. If there is a focus on creating apps for businesses, then I think core business logic should get a lot more attention.

I hate to rant, but these are the things I seem to fight with the most.

8 Likes

As a non coder I work from a completely different perspective, but interestingly have arrived at similar points.

Instead of knowing what is possible with code, I simply work on the idea that everything is possible with glide, until I discover it isn’t even with a work around.

I have abandoned a couple of projects because of these shortcomings, however I am still impressed with what is achievable. That being said, the projects I was working on appear (on the face of it) to be far simpler than those I have completed.

2 Likes

@Jeff_Hager spot on. If glide as they have stated wants to focus on internal business focused apps then they need to address these specific functionalities as you mention. It will make a huge difference - and will be expected by businesses.

And yes, some of the stuff you can do by workarounds but your app gets way more complicated and more difficult to maintain.

@david @mark this is a post that you should really consider understanding

A side node: adding if then else on each action in compound actions would also explode the flexibility and usefulness of compound action

4 Likes

Yes, Glide is really great for nocoders to Start moving from Idea to Reality; but the need for workarounds to perform simple operations (ex. multiselect choice component in the same datalist) is coming quite quickly.
Glide experts (many having coding background) can deal with it, but they are probably not in the 1 billion nocoders :slight_smile:

In addition, it would be great to know what features are on the short term roadmap (not clear whether voting for Feature Requests has any impact). It would enable to plan our apps, and avoid to use a complementary nocode platform: loss of focus for us to develop deeper our Glide skills, loss of revenues for Glide.

3 Likes

Hi, I have a doubt on the IF computed column in GDE.

After reading this thread, do I understand well:

  • IF computed column works as OR conditions?
  • The order of conditions is important? This I don’t understand; isn’t it contrary to the OR logic?

I don’t know if we’ll have an And/Or soon, but for sure it would be interesting to have more precisions in If → Then → Else Column - Glide Library on how this column works.

Thanks

1 Like

It depends. Is this for a visibility condition or an IF column?

If it’s an IF column, then the first condition that is true will return that value…so essentially an OR. If all of them are false, then it will fall through to the Else value.

If it’s an action, or visibility condition, then it depends on if you select the ‘And’ or ‘Or’ choice. Whatever you select will apply across all condition checks.

The problem I have is that you can’t intermix and and or. I have cases where I want to do something like this:

If (A=X and (B=Y or C=Z)) or E=F
ElseIf G=H
Else P

2 Likes

Thanks @Jeff_Hager.

Yes, it’s for an IF computed column in GDE, and I am trying to simulate an “AND” by putting the “not true” conditions in the IFs and the expected result in the ELSE.

1 Like

Yes, sometimes you have to reverse your thought process to build a working IF in glide. It’s fine for very simple logic, but to me the current implementation of IF logic is counterintuitive to how I was taught to write IF statements in code. In some cases it’s harder to build and harder to comprehend because of the weird way we have to structure the logic to work correctly.

If you have a specific case you’re trying to work through, I’d be happy to take a look if you have some screenshots.

3 Likes

Agreed.

Many thanks. At this stage it works ok when reversing the approach, but I’m happy to have double-checked the ““logic”” with you before entering in more advanced use cases (which will require to have several IF from IF columns…).

1 Like

you know… I think I’ve used it so much now that I’ve almost started to think in Glide if-then-else terms :rofl:

1 Like

I know. I think we are being brainwashed. :wink:

…then I have to go to my day job and reverse that thinking again…

1 Like