Hello everyone
Is there any way to get row value in url
I want to use this value to update another table
Thank you!
Solved! Go to Solution.
You are very wrong, but you can't expect help without you giving vital info about your app.
I think your problem is quite simple, but without a proper explanation we can't do much.
Your OP was anything but complex, it was vague, telling us to get a value from the URL, which is not possible. Eventhough you are seeing a detail view for table 1, you want to run an action on table 2, because what you see at the bottom is an embeded inline view of table 2
[_THISROW]
Hello Aurelien,
Thank you for your response
Actually, I have 2 tables in same view, the action is belonged to below table, but I want to get KEY value of above table
Waiting for your solution
I got it 🙂
In your screenshot, you have the detail view of one table, and the related ref rows from another table.
The [_THISROW] expression will give you the current key-column of the record you are seeing on the Detail view.
Please note:
[_THISROW] is equivalent to [_THISROW].[yourKeyColumn]
You may want to explicit what you intend to do with it ? It may be more useful.
Basically, I have details view of table 1 (red rectangle) and related rows from table 2 (green rectangle)
When I click 1 button check on table 2, I want to get KEY value from table 1 to paste that value to another table (check-button is 'Data: add a new row to another table using values from this row' fyi)
If in your table 2, you have a column named [table1] that is a Ref column that refers to Table 1, then your expression will be:
[table1]
I know your idea, but it's quite tricky that two tables have many-many relationship
Table 1 contains many sessions of a class, table 2 contains list of student in that class
So if I follow your instruction, result will be a list instead of single value
I don't get what you expect then.
I think I answered the question: "When I click 1 button check on table 2, I want to get KEY value from table 1 to paste that value to another table (check-button is 'Data: add a new row to another table using values from this row' fyi)"
Now, if your goal is different, why do'nt you say it at first ?
Make some tries, and tell us what you get. I won't keep answering to this thread while you don't try anything.
Don't get me wrong
As i said, if I follow your instruction (put table name on expression), result be will list of KEY on table1 instead of single value (refer screenshot for details), I just wanna get KEY of the row/screen I'm current be on
That's why I ask how to get row of current url
[table1]
Can you share:
- screenshots of your table1, table2, (from the app editor: Data>Columns)
- screenshot of your data action configuration
Here's simulation of two table, table1 is linked to table2 by class_code which is not key column of neither two tables
Screenshot I shared above is view every time I click to view details of table1's row
Let's say if I click to view session 1 on table 1, I only want to get KEY of that row (E599787D)
The issue you're running into is brought on by the fact that you're using many-to-many references in AppSheet.
What you really need is a bridge table connecting the two together. This adds a layer of complexity to your system, but in the long run you actually open yourself to easier functionalities down the road.
If you created a bridge table, where the records connect the session-tp-the-student - then under the session, you'll have a NATIVE list of student bridge records (from which you can then create a derivative list, using list dereferences, of all the students).
Basically: you're missing a layer in your database.
@Aurelien was spot on all the way; you're just missing this one vital connection to make things work easily.
bridge table already exists, but it doesn't help in this case
somehow there're several people encounter this issue as well but no way to tackle this issue at the moment
(https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Modifying-data-of-a-table-from-another-table/m-... - cessnfrrg's comment)
I give up, sorry. I will keep answering the same thing, I think I misunderstand something.
Maybe @SkrOYC, @Suvrutt_Gurjar @MultiTech @TeeSee1 @Steve (without any preference order) or anyone else will be happy to provide more help.
Thank you anw, this issue remained for quite long time, but still there's no solution
Did you manage with it?
Because I have the same problem
I have an attendance that I need to mark, and I want him to take the lesson number from the top table
I used a workaround to handle this issue temporarily
Only CONTEXT(“ROW”) feature could be a complete solution and I'm still waiting for it:
https://www.googlecloudcommunity.com/gc/Feature-Ideas/CONTEXT-ROW/idi-p/453636
Which means, if I have a table of classes and a table of students and another table of attendance, in the table of classes I see the students who are associated with the current class, I added an action that marks attendance and thus it copies the student's details to the table of attendance, but I would like to mark exactly which class he is in It was found that I could not do it except in a roundabout way and only on the date of the lesson
It seems like you have 4 tables.
Classes, sessions (which are children of classes), students in course (which are children of classes and students) and students.
You want to see all students for a certain class no matter if they attended that session you are looking at? Why? What's the purpose of your action? You have a 5th table to check if they attended that session and you want to add their attendance to that 5th table from your current view?
Btw, where is the many-to-many you talked about? I don't see it on your schema
PS: To prevent people from loosing their time, post as much detail as possible of your need and your actual schema. When I say your need I mean what you want to accomplish on real life, which info you want to get, no what you think you need to do inside AppSheet (like using X, Y or Z action or column). Your OP was quite vague and not related to your actual question
yes, my OP is quite complex and I don't have time to explain all of that to you
I used appsheet for my whole company's operation so it expanded to this level
back to my original question, I just want to get row value of the current screen (appsheet have context(), but it doen't have option to get the row), I think we could conclude that it's not feasible at the moment and wait for appsheet updating
You are very wrong, but you can't expect help without you giving vital info about your app.
I think your problem is quite simple, but without a proper explanation we can't do much.
Your OP was anything but complex, it was vague, telling us to get a value from the URL, which is not possible. Eventhough you are seeing a detail view for table 1, you want to run an action on table 2, because what you see at the bottom is an embeded inline view of table 2
well, if you still believe its feasible then show me how to do based on above example or your own example, up to you
My suggestion:
Create a new post explaining your actual need, screenshots from the AppSheet editor, as asked by @Aurelien, all of the tables involved, the action you created and what you expect from that action, and on plain english your real world need instead of your AppSheet need.
For example, we don't know yet if what you want is to log if a student attended a certain session or not.
Finally, open your mind to better solutions, we can't teach someone to breath if they want to do it underwater
@SkrOYC I don't think there is any need to answer further on this post. I really appreciate your help on this case though 😄
@khiemtg just in case that can help you, here are some basics about how to post on the community:
Guide on How To Create a Community Post - Google Cloud Community
I truly hope you will eventually find the answer to your question.
ok thanks all of you anw, hope for a better appsheet
I really want to help you solve your problem, because I feel it's quite simple, but you have to explain us what you need a little bit better.
You are keeping vital info to yourself believing that it's enough for us to help when it's not.
Any development, including AppSheet development, is based on team work. I learned that I can't go that far if I try to solve problems alone.
It feels like you are afraid of us stealing your app idea or something
Appreciate your time!
I used appsheet for quite long time and researched a lot about this topic but there's no solution yet
I will explain to you more clearly when I have time
Best!
Just to throw out some extra information, to maybe point you in the right direction to a solution:
Have you heard of chaining the references?
Basically, as long as two records are connected in some way, through various other tables and reference connections, you can get data from one to the other. Depending on how your system is configured, determines the specifics for how you go about it; but as long as your tables are connected, you can get any piece of data from anywhere in the chain.
Perhaps this might help you get information from table A, through your bridge table, to table B.
[Table A Ref].[Bridge].[Table B]
__________________
What a mess.
The question was quite simple. We need to get the context and id of the current row shown in the Details view, and the AppSheet team couldn't answer if it was posible or not.
Indeed, many users really need this function
@khiemtg wrote:
Only CONTEXT(“ROW”) feature
[_THISROW]
This doesn't solve the problem. We need to get the RowId of the current Detail view for an Inline view object. In my case, I have a related items list, and I need to show the text of the Inline view in red if it is missing. So I have to check if it is in the missing items list of the current Detail view Row.
@alexruiz2552 wrote:
This doesn't solve the problem. We need to get the RowId of the current Detail view for an Inline view object.
Actually @Steve is right.
You may have a misunderstanding of how to use [_THISROW] in an expression.
[_THISROW] will return by default the key of the current record. So, if your key-column is [table_id], these expressions are strictly equivalent:
[_THISROW].[table_id]
and
[_THISROW]
About this:
@alexruiz2552 wrote:
In my case, I have a related items list, and I need to show the text of the Inline view in red if it is missing. So I have to check if it is in the missing items list of the current Detail view Row.
I'm afraid this doesn't make sense. "Related Items list" uses a REF_ROWS() expression by default: nothing can be missing.
Now, if you are looking for something in the columns attached to the related items, then you can use a deref list expression such as:
[Related Item][column-to-look-in]
For example:
IN("this_value", [Related Item][column-to-look-in])
I will be more clear in my explanation 🙂 I have this Inline View of Related Objects (Badges) inside a Detail View of a Parent Object (A sign).
In my Parent Object, there SHOULD be those related badges, but sometimes they fall off the sign. So I want to show in red the ones that are MISSING. My idea was to have an additional column that is called "Missing badges" and to make a format rule that says:
If (IN([BADGE_TEXT], [Missing badges])) then show in red.
However, the column [Missing badges] is available in the Parent Object, and the format rule only lets you get the columns of the Inline Object. The solution is to have a CONTEXT option that gives you the current Detail View row, that is, the Parent Row.
This way i could use:
If (IN("[BADGE_TEXT]", CONTEXT("ROW").[Missing badges])) then show in red.
If I wasn't clear please let me know, thanks.
the parent row is the column of type Ref.
So if in your inline table you have a column named "PARENT", then your expression will turn into:
IN([BADGE_TEXT], [PARENT].[Missing badges])
There is no Parent column because multiple parents (signs) can have the same child (badge)
@alexruiz2552 wrote:
There is no Parent column because multiple parents (signs) can have the same child (badge)
then
@alexruiz2552 wrote:
I have this Inline View of Related Objects (Badges) inside a Detail View of a Parent Object (A sign).
I'm getting confused.
I suggest you create a new post to avoid polluting this thread 🙂
Thank you for this clear explanation. You are correct: there is no way to do what you're trying to do, and CONTEXT("Row") (or similar) would be useful.
User | Count |
---|---|
34 | |
11 | |
3 | |
3 | |
2 |