Hello, i've been struggling to make this work.
Basically i have a view that should only allows edit on a row only if that row mets an specific condition.
My app logs payments received, so if i got the full payment the [confirmation of full payment received] column is "TRUE", and no further edit should be allowed to the row.
At the same time, if i got an advance payment, the [confirmation of full payment received] column is "FALSE". Only in this scenario i want the edit button to be shown.
I've tried creating two slices with different permissions, but i don't know how to merge those two slices in a single view.
This is the view now:
Now, the slice of the view does not allow any changes to be made, but the yellow colour indicates that i have only received an advance payment.
Any ideas on how to achieve this? i've found this link https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Action-button-only-available-conditionally/m-p/... with someone asking for something similar to what i need, but i cant seem to make with work with my app.
Solved! Go to Solution.
Let me put it this way. You should have two tables. One for the amount owed and one for the payments. Essentially a one to many relationship. The invoice will be the one and the payments will be the many. It sounds like you can accept more than one payment towards whatever amount it is that they owe. Trust you will see that this is an easier way to organize what you are trying to accomplish. You will probably want a client or customer table as well.
Thank you Josh! I'm sorry for asking this basic question. I could make it work with that.
Now, when a payment is completed, the row can only be edited for 2 days in case there is any mistakes while registering it.
The advance payments can be always edited till they are completed.
On the other hand, when i click the edit button, the rows to edit have to be different from each form based on the [confirmation of full payment received] column status.
How can i achieve that? I already created two slices with the columns needed on each condition, but again, i don't know how to "merge" those two slices on a single view if that makes sense.
Hope you can help me, if not thanks anyway!
Regards,
Federico.
If you could provide me with the formula you are using that would be helpful. But from your explanation I would use OR() or IFS() or IF() depending on what you are trying to accomplish. I usually start with one expression and see if it accomplishes what I am wanting to do with the one condition. Then I remove that expression and work on another expression to see if it will give the the other desired result. Then I smash them together in an OR() expression.
Hope this helps,
Josh
@Josh_Klassen wrote:If you could provide me with the formula you are using that would be helpful. But from your explanation I would use OR() or IFS() or IF() depending on what you are trying to accomplish. I usually start with one expression and see if it accomplishes what I am wanting to do with the one condition. Then I remove that expression and work on another expression to see if it will give the the other desired result. Then I smash them together in an OR() expression.
Hope this helps,
Josh
The actual formula for the edit action is:
OR(
[confirmation of full payment received]="FALSE";
AND(
[confirmation of full payment received]="TRUE";([full payment date]+1)>=TODAY()
)
)
I understand what you are suggesting, but i don't know where to put the conditions, or even what is the expression to show another slice if a condition is met.
Update: i believe i've come to a path to follow:
I have created two form views with their respective columns for the same slice HISTORY OF PAYMENTS:
View 1: History of payments - FULL.
View 2: History of payments - ADVANCE.
The formula to show_if for View 1. History of payments - FULL should be something like:
if([confirmation of full payment received]="true")
and for View 2. History of payments - ADVANCE.
if([confirmation of full payment received]="false")
but when i try to use them it it says: "Unable to find column 'confirmation of full payment received'".
Then i tried this other show_if conditions:
View 1. History of payments - FULL
IN(TRUE, SELECT(HISTORY OF PAYMENTS[CONFIRMATION OF FULL PAYMENT RECEIVED], [CONFIRMATION OF FULL PAYMENT RECEIVED]=TRUE))
View 2. History of payments - ADVANCE.
IN(false, SELECT(HISTORY OF PAYMENTS[CONFIRMATION OF FULL PAYMENT RECEIVED], [CONFIRMATION OF FULL PAYMENT RECEIVED]=false))
It does seems to work, but the result is always "yes", i need a way to iterate on each row, or atleast on the actual row ( [_thisrow]. does not seems to work here).
Sorry for the length of the post, i tried to be as clear as possible. Also if you prefer i can start a new topic.
Regards,
Federico.
I am starting to think that maybe this question might be best answered by someone with more experience than me. So you may want to post again with your new question.
However, I will attempt to answer your question.
I would not recommend using a slice to chose which columns to show in a form view. I would create different show_if expressions for each column based on what you are trying to achieve. Something like [CONFIRMATION OF FULL PAYMENT RECEIVED]=false) would show the column on the form if the full payment has not been received.
However it seems to me that you might be looking to change whether or not a user can add payments to an invoice if the invoice has been paid?
Now I am assuming you have a parent table with invoices and then a child table with payments towards that invoice?
Hello Josh, thanks for your help once again.
I thought about the idea of using show_if expressions on each column, but while it may work i believe it's not the most time efficient way to proceed, because my parent table in Google Sheets has more than 60 columns.
@Josh_Klassen wrote:However it seems to me that you might be looking to change whether or not a user can add payments to an invoice if the invoice has been paid?
Yes, this is what i'm trying to achieve. For now i'm the only user of the app, so there is no filter of users involved. Just the confirmation of payment.
@Josh_Klassen wrote:Now I am assuming you have a parent table with invoices and then a child table with payments towards that invoice?
Not really, i have a single table for payments. I don't have invoices. Basically i manage a temporal rental property and just wanted to record the payments from the guests, sometimes they pay half in advance and sometimes they pay in full.
Well, thanks for your help, i'll create a new post with my new question.
Regards,
Federico
Let me put it this way. You should have two tables. One for the amount owed and one for the payments. Essentially a one to many relationship. The invoice will be the one and the payments will be the many. It sounds like you can accept more than one payment towards whatever amount it is that they owe. Trust you will see that this is an easier way to organize what you are trying to accomplish. You will probably want a client or customer table as well.
Thanks for the advise!! As its right now i can only accept 2 payments tops. I don't know how to accept more than 1 advance payment but that's a thing for another day, i'll figure it out eventually.
I have a "Guest" table, and a "reports" table too. I'll split the main one "HISTORY OF PAYMENTS" as you recommend later.
As for my latest problem, i finally make it work just by adding conditions to each column, tedious, but it worked.
I came close to a quick solution using this formula in a new action:
IF(
[_THISROW].[CONFIRMATION OF FULL PAYMENT RECEIVED]=TRUE);
LINKTOFILTEREDVIEW("History of payments - FULL"; [ID_payment]=[_THISROW].[ID_payment])
;
LINKTOFILTEREDVIEW("History of payments - ADVANCE "; [ID_payment]=[_THISROW].[ID_payment])
)
The new action actually took me to the specific view but it was empty, i don't know why.
Nevertheless, everything is working now. Thanks for your help Josh!!
User | Count |
---|---|
15 | |
11 | |
9 | |
8 | |
4 |