- What is the best (most simple) solution to invert 2 values of 2 different colums (same line) for instance using “ok button” ?
- Is it possible to extend it to several lines depending on another line value using another “ok button” ?
Thanks for your help
For example, one value is “available” and the other “unavailable” but when a button is pushed you want the values to switch?
Yes but not only binary values, it could be numbers or text to be switched between the 2 columns
What’s the use case? Basically, you’d just use a series of if/thens that check each other and you’d display the if/thens, not the original columns. Glide’s Bike Borrow Template does a basic version of this:
Using if, then, else this looks not so easy. Case is to ask user to keep the current value or change it using the box button, and this has to work bakwards. As for exemple :
Status = “book not received”, if I push ON the button, Status becomes “order new book”
then if I push OFF the button, Status comes back to initial value that is “book not received”
May be other function than if, then, else offer the possibility to temporary save a given value.
Glide’s Bike Borrow Template example doesn’t answer the question, because checkout lines are incremented by 1 each time a change occurs. In my case 2 cells are on the same line. It’s kind of flip-flop depending on OK button position.
So to clarify, you have two values (labeled "Status) on the same line “Not Received/Order New Book”? You want to display this status when a user Toggles a switch (labeled “Keep Settings”) to the On position (true)?
Is this a per item or per user setting?
By the way, I made a mistake using Glide’s Bike Borrow Template, I entered profile data without making a copy of the example before to use it. May I ask you to ask someone to remove the few added lines in the Profiles tab, or to restore the example for others ? Thank for your understanding
No it’s 2 different cells of the same line. One is labelled Status1 and the other Status2.
Sorry I think I wasn’t clear enough:
Status1 = “book not received”, Status2 = “order new book”
then if I push ON the button,
Status1 = “order new book” , Status2 = “book not received”
then if I push OFF the button,
Status1 = “book not received”, Status2 = “order new book” (as initially)
of course using certain filters like Email client is signed-in-user.
I think the only way to do that is to use IF/THEN/ELSE rule(s) when addiing new column(s) in DATA view, isn’t it ?
Nothing is saved in a template unless you made a copy of it. If you made a copy, it’s yours, so there is nothing to clear out.
thanks
Hi Jeff, I don’t know if you find an elegant solution, if yes I’m of course very interested in.
Anyway here is a workaround that comes in mine mind in the meantime. The problem in fact was to make an “&” fonction between 2 columns in the DATA view, that is not possible … except if we remember some famous Morgan boolean theorem that is :
A&B = not (notA + notB)
where “A” is my element “Status” and “B” my OK button
Hope this could help someone too !
Yes exactly, both are on the same line
Hola @Jean-Philippe
If I understood your request, I think it’s what you want…
Sorry if I missed something reading your explanation
Saludos
Gavp
Hi Robert_Petitto, Hi Jeff_Hager, Hi gvalero,
Thanks for your analysis and proposal, but I realized I wasn’t clear enough because I mixed 2 issues, and I do apologize for that.
-
one dealing with the Inversion of 2 values (2 parameters on the same line) using a Button.
Thanks gvalero for your answer, that close the issue object of this thread. -
the other dealing with an “AND” of 2 parameters as condition to authorize this Inversion
Please note also that in my case Status is a VARIABLE (Text, Integer or Date) and can take several values, means not only 2 fixed Text values (as in my above example).
For the 2nd issue, let’s summarize the problem as follows, knowing B1 and B2 can be a Button or any Boolean column parameter in DATA view:
IF C (where C = B1 AND B2 conditions)
then set NEW STATUS to a SPECIFIC VALUE (like for example “GO” if NEW/CURRENT STATUS is Text)
ELSE do nothing, means NEW STATUS = CURRENT STATUS (where CURRENT STATUS is any value, and therefore can be SPECIFIC VALUE too)
As far as I know, the “AND” operator is not possible in IF-THEN-ELSE function of DATA view.
- Please correct me if I’m wrong. This is important for my future developments.
To solve this issue, I used “OR” operator and a 3rd intermediate parameter (B3), that gives (thanks to Morgan Theorem):
C= not(not B1 OR notB3) with C3=(notB1 OR B2)
That gives replacing B3 in C :
C= not(not B1 OR not(notB1 OR B2))
C= B1 AND (notB1 OR B2)
C= (B1 AND notB1) OR (B1 AND B2)
C= B1 AND B2, because (B1 AND notB1) = 0
- Did you know this “trick” ? Do you have better solution ?
Again sorry having mix 2 issues.
Have a nice day
It may be easier to help if we have actual data and examples of what you want instead of just column variables. It would make it easier to visualize.
I think I might know what you are asking, but it’s hard to visualize without an actual example or screenshot from your sheet. If I’m understanding correctly, you may want to first create two If Then columns to check each condition separately and then set the result to True or False. Then you can create a template column to join both results into one column. Then create an If Then column to check for ‘True True’, ‘True False’, etc. This may or may not be easier.
Please find attached what I’ve done to realize an “&” condition between “Bouton de reselection” (that is the switch Button) and a variable “Modif Cde” (that authorize or not the modification requested by the switch). The icon should be set in “Next Status Icon” only if “Bouton de reselection” is TRUE and “Modif Cde” is
, otherwise value of “Status Icon” should be taken.
I didn’t find any more elegant solution to perform this “&” condition, I would be very interested to know it if any.
I haven’t had my coffee yet this morning, so I had to draw this out on paper to check every scenario. Is it correct that the only time want the to show is when Modif Cde is
AND Bouton de reselection is TRUE?
If so, then I would create a template column that joins Modif Cde to Bouton de reselection. So you could end up with a result that looks like this (‘TRUE’). Then Create and IF THEN column that looks like this:
IF
is ‘TRUE’
THEN
ELSE Status Icon
To me it’s a lot easier to read and follow compared to your solution.
Yes exactly you understand perfectly the point !!
Could you please be more precise and tell me how the “template columns” should be filled-in ?
From data/Custom => From Data
Source column => Status Icon
Replacements => Next_Status Icon =
But where should be entered “Bouton de reselection” and “Modif Cde” ?