MASTER LINKTOFORM() and Other Deep Links in AppSheet | Bootcamp Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello fellow app sheeter app sheetist app sheetster app sheet of sewer hey what are you supposed to call someone that app sheets hello and welcome to this free app sheet boot camp this is a recording of a real boot camp with real people like you who are upgrading their careers through appsheettraining.com you're about to hear from austin who's going to explain how we can help you do the same if you want to get straight to the content skip ahead about three minutes and you'll find me diving into how custom navigation and deep links work in app sheet now let's get you building great things hi everyone my name is austin skidmore i'm one of the solution architects here at crew technologies welcome to app sheet training's free deep link bootcamp we are super excited to have you here with us today to learn more about deep links and app sheet before we get started we have a quick presentation about our app sheet training services that we are excited to share with you our mission at app sheet training is to empower you to develop apps on the app sheet platform for any use case what we found was even no code app development can feel intimidating for me i had no experience writing code to develop apps i tried developing a few apps using app sheet on my own and was running into some roadblocks and creating actions and automations with the help of expert instructors here at crew i was able to learn how to develop an action for my specific use case this has allowed me to bring my app sheet app ideas to life and deploy them to help us automate our business processes we wanted everyone to have access to this great experience in developing app sheet apps that's why we created appsheettraining.com where you can also learn these essential app sheet skills from our expert instructors even app sheet agrees when talking to companies who want to embrace citizen development appsheet says that in-depth training is the best way to empower a citizen developer culture next let's meet the crew these are our trusted app sheet experts ready to help guide you through the app sheet platform our instructors have a combined skill set of app sheet development and certified teaching experience our students feel empowered to develop app sheet apps after going through our courses read these responses from our students if you want to learn more about their great experiences next let's talk about how it works step one is to set up your app sheet training profile step 2 sign up for a tech talk to find a learning path that works best for you and step 3 complete your learning path to become an app sheet expert if you're ready to start learning right away we currently have five on-demand courses available check out the links on the slide and start learning best practices in app sheet now our next learning path is designed for students who would like to learn from an app sheet instructor we currently have two boot camps available click the links to grab your seat for the next boot camp to complete your learning experience we recommend that you sign up for a consulting package where our expert instructors will guide you on the design of your app at various levels check out these services here now that you've seen how app sheet training can empower you to develop the best app sheet apps your next step is to click the link below and register for a tech talk with me and we can look at your project scope and guide you on the best learning path to complete your app sheet apps thanks for joining the app sheet training community we look forward to guiding you on your app sheet learning journey all right so today's main content is going to be custom navigation and deep links so by default when you create an app sheet app it builds in navigation for you so you have a menu bar at the bottom and then you have a little hamburger menu at the top left that opens up a list of other menu options when you click on a single like a table record view it opens the single record detail view for that record and then there's an edit pencil and you hit that and opens a form all of those transitions are navigations and they're the default navigations that app sheet provides but what if we want to do something different that's where custom navigation and deep links becomes relevant so in today's session we're going to talk about generally how apps navigate and then we're going to talk about uh the app that we're going to be looking at and kind of the setup there and then we're going to actually go in and build some deep links so i will kind of show you the app that we're going to be working with you'll see some pictures in my slideshow but here's the app it's a variation of a common sample app that app she provides called the national parks app okay so i picked this because it's easily accessible it's familiar and we put some customized tweaks on there so that you can kind of see the expansion of the feature set it starts with one main view and if you're not familiar with this view type this is called the gallery view where it just shows a picture and then a name of something and typically when you click on one of these views it opens a detailed view of a single record but we're using a link to view deep link action to instead open another view type entirely so i clicked on all parks and it opens up a card view of all of the parks which there are quite a few and if i click on one of these it opens a detail view and you can see we've got a related notes section and a button at the top that says create note and that opens a notes form and pre-fills the park that we were just on so that i can add a really cool note so that you know somebody else can appreciate that aspect of a park going back to the main menu we also have a map and then a view called parks by state which we'll demo at the very end that has a link to filtered view action here so if i click utah it'll show me the five parks in utah again this is the all parks view but the data is limited to only the ones related to utah and then this is just a view with a slice of all the ones that i've visited so we're going to talk about all of the deep links involved here to make this custom navigation experience possible okay so zooming out a little bit let's talk about app navigation in general when you are navigating through a website or interacting with a web application nine times out of ten you're seeing information that's specific to your visit to that website you're not seeing the exact same content somebody else is seeing so when you go to google and you type something in and press enter if somebody else is on google at the same time surely they're not seeing the same thing that you're seeing you entered a custom search that you wanted to see an app in google's computers and servers should serve to you the specific information you requested okay so that type of custom user experience uh behavior is usually uh communicated to the server by a specific url and a thing called a parameter okay so modern web apps use url parameters to control which views or data to show a user at a particular time and it usually follows some sort of pattern here so we have the domain name of the website a slash and then usually a path so like some page of that site and then optionally you might see what's called a query string or a list of parameters there's the specific language is not super important here but i'm just trying to familiarize to you guys with the general concept and so what that might look like here is we go to blah.com app so it pulls the app page but then there's this question mark which indicates to the uh computer that you're requesting the website from the server that you want to see some special information and so you pass it a parameter and a value so what that might look like in app sheet terms and things that you might be familiar with we have the base path which is the general uh navigation to your default starting view of your app so this is what's bolded up here so we have the domain name appsheet.com start and there's actually another slash and then inside of there is your app id every app sheet app has a unique identifier and so you can kind of see down here in the first picture uh the link for this particular app is appsheet.com start slash aa006 blah blah blah blah blah so that will open this specific app and then on the other side of that is some parameters that tell the app to show something different than the default uh we'll get to that in a second so if you're curious what's the base path to my particular app you can go to the ux menu or sorry the the users menu and the links tab and you'll get the browser link which will give you the sort of default starting link for your app and when you open that it's going to show you the starting view for your app first so second picture down here you see i'm in the ux menu and in the options tab and the first option is called starting view and the name of this one is national parks so that's why when i opened the app for the first time in this browser it would start here on the national parks page but what if we want to send the user to another page besides the default page well that's when we start customizing the parameters that we include with the main url so instead of a question mark app sheet uses this little hash mark that's not super important right now but just so you know that's kind of where all the custom stuff begins everything right of the hash mark and what we are putting behind that hash mark are deep link parameters so these are things that app sheet has specifically defined and said okay if you give me a certain value for the view parameter i will go look for a view named that thing and then i'll switch to that view for you so uh down here uh it says these parameters tell app sheet to load specific views data and many other configurations options so there's more than just the view um and as a sort of a tricky thing you see here that it says like parks percent 20 by percent 20 state urls can't read all of the characters that are in the normal typing alphabet are typing characters such as spaces and so everything in the url bar if you want to communicate it clearly has to be encoded okay if you want to read more about that there's a little link here that you can follow that's just you know some for fun reading on the excuse me the tech specifics behind encoding but not super relevant to what we're doing this is kind of hard right uh it's a lot to remember a lot to think about and appsheet you know made that uh they said well you know what we're making a no code platform we should make it you know pretty easy we want them to be able to do custom navigation but we don't want them to have to know about parameters or url encoding or all of these things so we will give them deep link actions okay so you may have seen a few of these before these are expressions right here um that code for special url parameters that go that will navigate you to a different part of the app so link to view link to filtered view link to form all of these will code for moving you to another view and you'll give it some specific information in between the parentheses to kind of tell it what view and maybe some other special information so that it can generate for you all of those complex urls so you don't have to worry about it and navigate your users cleanly and reliably to that other place so again deep links are expressions that you can use to generate these custom navigation urls they're going to move your user from one screen to another dynamically based on some event that they take or some event that they trigger inside of your app so you can't just put a deep link anywhere uh deep links are expressions but you know you can only put them inside of an action you can't put them inside of an initial value or any of the many other places where expressions can be placed in app sheet there's they have to be tied to an action and an action is always triggered by some user event this might be the press of a button so if you remember uh when i was demoing creating a note there was a button there and i clicked that button and it initiated uh this deep link action and opened a new form when pre-filled some information there are other types of actions that you can trigger or there are other types of events that you can trigger actions on such as a form save or even clicking on a certain view element so in the ux menu when you're customizing a ux view there's a behavior section and you can actually change the behavior or the action that fires when somebody clicks or does some other type of interaction with your view so here's a couple of examples i mentioned the create note right this is a picture of my app editor when i was creating this app you can see i'm in the behavior menu in the actions tab and i'm editing this action called create note all right it's saying here's the name create note it lives as part of the parks table and in the do this option because app sheet actions can do lots of things to make a deep link you have to choose the app go to another view within this app that says okay i'm gonna you know generate the specific behavior for that and i'm gonna ask them for a link target after that so you'll select go to another view within this app and it'll say okay give me a target where am i going and that's where you can enter your deep link expression and i wanted this to be a button press so i made this action display prominently and that's what made it appear as the create note button inside the detail view of my park now i did something different with the kind of gallery menu right there was no button there when they clicked on the menu item it then triggered the action so this one is actually part of a ux menu behavior so i had us first create the action in the behavior tab or the behavior menu in the actions tab i'm building an action called go to menu view and it's part of a table called the main menu table so i'll show you that in a minute but that's the data table that generates this list of menu options in my national parks view and then i selected app go to another view within this app and i gave it a target now this time instead of using a deep link expression i'm just kind of showing how you can manually construct it if you want to attempt that so i have my hash mark and view equals and then an ampersand to say join it to another thing and then i use a special expression called encode url again because certain things have to be encoded for urls to read it properly and then i'm passing in the column value link from my table so each one of these records has a link property defined in my spreadsheet and it is taking them to a different place and so that's why i'm putting it inside of my deep link expression there again i set that to display prominently but that would only make it show in the detail view which actually doesn't happen here instead i've had this trigger on the ux behavior so in my ux menu in the views tab i have created a view called national parks i based it off of my main menu table so it would show me the list of menu options and i've set it to gallery i made a show up in the center of the and at the bottom in the behavior drawer there is a setting called the event actions and it may list one or more event actions that app sheet allows you to interact with so this event is called row selected so whenever the user clicks on the row that particular record so they click on parks or parks map instead of triggering the default which would open the detail view of that record we are saying actually run the action we just created called go to menu view and that's going to deep link them to some other view based on the link property of that column so if this is going over your head don't worry we're gonna all do this together in real time in just a minute okay so let's take a look at the link to view um expression in action so app she gives us two options to just change what view we're looking at so we're in one view a user takes an action and i just want to open any other view in my ux view options so if i've created a new ux view and called it super awesome map and i just want them to get navigated to that view i'm going to do something like this i'm either going to manually construct it or i'm going to use appsheet's helper expression link to view which is a lot easier i just did it both ways so that you can see it in action and then on the inside of it it asks for the name of the view that we're going to go to so the view name here and i actually stored the name of that view in a column and so that's why i'm referencing it here the link column if you just wanted to go to a static view you could put it in quotes and just put the actual name of that view and then we will do one other type of action today and that is the link to form so i showed you the notes action this is the syntax for that expression it doesn't just ask for a view name it asks for the view name of particularly a form view type and optionally it asks for a a list of columns for that new table that you're opening and then values that you want to pre-fill in the form so you can use this to open a form view and pre-fill any number of columns or fields with data from either an expression the previous table that you were coming from or static data so here's the example of what is uh building this deep link to create a note we're saying we're going to use our link to form expression i want to open the notes form and then i want this to be related to this table actually has a column that is a ref column called park and i want it to tie back to the park i just came from so i'm going to say i want to pre-fill the part column and i want to pre-fill it with the park id column from whatever row i just came from and then there's another field called note and i don't want to leave it empty but i want to indicate that the user should put something there so i'm going to pre-fill it with this text i'm a note and then you can kind of see it in action there okay i covered a lot and talked for a while are there any questions confusion did i kind of rush through anything or are you guys ready to move on to setting up your app can i ask a real quick dumb question yes do you set up the form before this like before you made that that link to view yes so in order to do a link to view you have to already have created a view and given it a name so yeah the chicken comes before the egg in that scenario great question all right um okay well let's move on to the app setup if anybody has a question at any time go ahead and stop me so we're gonna walk through copying an app that is in progress okay so this app does not yet have the uh custom menu set up for us so it starts on the all parts view and we're going to work with bringing in a new table the main menu table adding it in and building that gallery view and the deep link action that will allow us to navigate to our different view options that we have created here all parks map parks by state and parks visited and then we're going to work on that create as well so i'm going to copy this link and send it to everybody yep okay sending this out in the chat do me a favor go ahead and click on that and try to open it it should open directly to the manage and author tab it may ask you to log in app sheet if you're not already logged in last time we did this and people had some trouble opening the link they couldn't actually get to the app really not sure why that happened but if it does just let me know and we'll try to get you access later after the session but you may just have to watch instead of build along okay can somebody give me a thumbs up that they were able to open it to this page sweet thank you terence great thank you kelly okay getting some positive confirmation appreciate that one okay so once you're on this page you're going to click copy app so there's this copy out button right down here in the middle and you're going to copy it you might want to rename the name to something relevant to you i'm using google as my data source today if you're using something else then it will look a little bit different but it should all still function about the same and the app is asking me do i want to make a copy of table and file data i'm going to say yes to both of those and copy the app what that's going to do is app sheet is going to take all of the attributes about this app and its connected data and build new spreadsheets on my account and create a new app for me connected to that data so that we can all work on our own versions of the app and kind of have our our take away um you know demo app for for this session takes a couple of minutes to go through the process and once you go through that give me some thumbs up or some affirmations in some capacity so i know that it's working for you okay excellent brandon you've got it going jared's got it kelly's got it excellent doc brown's got it terence sweet okay guys we're rolling this is great okay so let's uh let's start here with info and i want to show you a little bit about the data relationships in the app so far so when we open the spreadsheets you'll kind of know why i've got things set up the way i do the only related data we have is relationships is between part and notes so we have three tables right now park state menu and note we're going to add a fourth called main menu it's not going to have any relations here but just know that a part can have many notes and that means that the note table has a column called park and it stores the id of one of these parks so that you can know that this note belongs to that park okay we'll see that in action but just wanted to give you guys a visual before we start looking at a bunch of spreadsheet data that can kind of feel intimidating sometimes okay i'm going to go to the data menu and the tables tab i'm going to click on any one of these tables and i'm going to press view source that's going to take me right to the spreadsheet that was created for me when i did the copy app okay and that loaded up for me you'll see at the bottom there are four tables parts main menu state menu and notes and i have some color coding in the sheet every table that has a special id or a uh kind of an encoded id like this i have highlighted in green that's the key column and then in blue i highlight the label so if you have tried to relate tables together before in app sheet you may have noticed that there is a setting here i'm going to go to parks you have key and label and you can have one field be the key and you can have two labels one is a text type label and one can be an image type label and so i have both of those labeled here and the only one i really highlighted was the name uh that just means humans can recognize things by this column but app sheet apps need to recognize it by this column that's uniquely identifying in the main menu table i have a very small table with four items you may recognize recognize these parks park map parks by state and visited i have a column for the order so i can manually rearrange these if i wanted to so i don't have to sort alphabetically or i could do something different than sorting alphabetically and then i have the link which is the name of the view that i want to take users to when they use this and then a link to the icon my state menu is a pretty simple table it is one column it's a list of states and then our notes table because it's relational and more complex i've got my key column specified i have my label column specified and then in kind of orange here i have the what's called the foreign key or the reference column highlighted as well indicating that this contains key values from another table so if we look for six cf i can go over here and do a little find and it brings me down here to row 60 oops 6 cf 138 bc yellowstone so we can see that this note is related back to the yellowstone record okay so all of that is just to give you context about what the app is that we have set up we're not going to really manipulate those we're gonna be focusing specifically on the main menu table here okay so uh david asked earlier do you have to pre-create the view before you link to it yes and if you open the app and you go to the ux menu and open the views tab you're going to see a few views already created all parks map parks visited and parks by state and then in my sheet i have all of those named right here in the link column if i want to change parks visited to parks i visited i would have to come in here and change change it here as well otherwise this link would no longer go to this view right it's a pretty direct relationship all right does anybody have any questions about the data before we bring the main menu table in and start building our custom menu sweet i think i think we're good if you do please interrupt if you go to the data menu and open the tables tab you should see a suggestion for add a table for main menu app sheet's pretty smart it recognized that there's another table uh another sheet in my spreadsheet that's not being used maybe i want to use it so it's suggested here i'm going to accept that suggestion by clicking on it and then actually it's going to add it and automatically save the app by doing that uh app sheet by default gives me all permissions on this table i don't want all of those this is a menu view users should really just be able to see it and click on it they don't need to add records to it they don't need to update them or delete them so i'm going to change the table permissions to read only i'm gonna save that change okay just because we added it uh really doesn't mean much happened but the order of operations i like to follow when i add a new table is i like to one change the permissions to go to the columns tab and open it up and make sure app sheet is reading all of my columns correctly okay this is this is a small table users aren't adding or updating it so i don't really need a super stable key like in parts and notes where there's like the randomized key value uh the name should be good enough for now so i'm gonna leave that the way it is app sheet set it to a name type column which is really a text column that app sheet would say okay that should have a higher priority when i'm making views and picking defaults or first columns or first fields that should show and uh sometimes it will automatically set that as a label if you make it a name same thing with image it recognizes there's a url here and so this is an image type and you don't have an image label already specified so i'm going to go ahead and specify it it grabbed that order was a number which is fine and because we're not going to be um like looking at the detail view of these things i'm not going to worry about hiding any of this yet so all these column settings are set and should be good to go so if my table settings are right my column settings are right i want to go ahead and make a view so that i can see it in my app i'm going to press new view and again i went to the ux menu and the views tab press new view and i believe i named this national parks as the view name in my other app so i'll try to keep it consistent and it's for this data the main menu it happened to put that already great the view type i have it set to and the other app is a gallery but you don't have to choose a gallery any of these would work a deck view would work any of the multi-record views that aren't calendar so table view gallery or card view um i i think gallery usually is most appropriate for the main menu or like custom center menus so i'm going to leave it as a gallery um i think i'm going to make it small image sizes so that we can all see it on the same screen and i want to change the sort you know i gave it that custom column to sort by so want to make sure it obeys that and let's change the icon we got trees trees i like that one okay great i'm gonna save that give it a little test that's looking good just like my other app if i click this whoa okay it doesn't open up the all parts view it opens up the detail view for that record it shows me its name order and the link and of course the image here which is nice but uh it's not what i want it to do i want it to open a different view so somebody help me out where where's my next step going to the behavior section and edit event action okay no of the view the behavior of the few i think okay and behavior so it's only given me this option right now auto so what that means is there are no other actions created for this row that could be put here or for this table so we need to go make one let's go to the behavior menu and we can see there are actions for notes parks and state menu but not the main menu so we're going to press new action and this is the we want them to go to a different view when i click here so i'm just going to call this go to menu view and i don't want this on the parks table i want this on the main menu table so i want it to be interacting with this table primarily and it asks me what do i want to do again if i click this i get a ton of options the ones that work for that utilize deep links are go to another app sheet app and go to another view within this app okay i'm going to click that one and now it's asking me for my deep link target um i'm just going to save this for now and see if we don't get an error here it says we have an error but it is a weird error it's saying i'm not going to a column or i'm not setting a column but i don't want to set a column all right so somebody help me out here what am i going to be putting for this navigation target i'll help you out it starts here in this deep links section of the expression editor this is a list of uh common patterns for writing them directly or how to use and how to use the different types of deep link options we have quite a few options available to us any idea which one of these i should choose right now you got it linked to view now uh if you see on the pattern on the left it says link to view the first parameter that's going in here is called view name but there's a second one and it has square brackets around it okay that doesn't mean it's a column name that means in in terms of like their pattern syntax it means that this is optional as in you don't have to include this parameter if you don't want to you could just put a view name so an optional app id meaning i could actually link them to a another view in a different app entirely i would just put the app id for that one there so oops didn't mean to click that so i'm just going to click the insert there and it's going to give me the default pattern i don't want to go to a different app so i'm going to delete the second parameter and let's go in here in my apps it's i mean i don't want to navigate to a view called my apps i want to go to a different one based on what row i'm in thoughts column a link to the column that has the few names that's right so if i go to my columns list here it'll show me the list of all my columns and i have access to the link column right here so this action is firing on a single record of the main menu table meaning i can pull values from that whatever row this action was initiated on and i can use it in this expression so that's exactly what i'm going to do i'm referencing the column so i have to put it in square brackets and it's link not links great i'm going to save that hopefully app she doesn't yell at me okay great uh if i click on it it doesn't take me to a different view but it does show me there's a button here now and if i click on that button it does take me to the other view so we know the action is working we just want to trigger it on a different event okay so by default because this action is set as a display prominent action it's going to show up as a button in the detail view that's fine but i want it to trigger instead on the behavior of the ux view now uh i think it was terence earlier who mentioned that we can go to the ux menu views tab and go down to the behavior section and before we on the row selection event we couldn't change the action but now there are two options auto which goes to the detail view or go to menu view let's bind that action to this event give it a test oh yeah that is what i want to see excellent all right so custom menu done mission accomplished let's uh move this other all parts view out to the side menu all parks is now on the side menu so i just changed its position here and i want the app now to open to the national parks view by default so i'm going to go to ux and options and i'm going to change the starting view to national parks and i'm going to save that so we have a new home view for our app and it is navigating to whatever view we put in the links or the link column for that table excellent custom menu accomplished let's look at the next uh next action that we want to do so link to form is a really powerful deep link action and the first and most obvious place to use it is with related tables so i'm gonna click into zion national park here and again i'll remind you that in the notes table we have a park it's of type ref it is referencing the parks table as its source and when we do that app she makes a virtual column for us in that parent table or the parks table down at the bottom i end up with this blue pencil column it's a virtual column meaning it doesn't exist in my spreadsheet but app sheet shows it in the app and it has this fancy ref rose expression which we're not going to worry about but it it's basically a list of all the notes that are related to this park okay so stephen yep uh could you could you show how oh uh could you show how to make the uh button go away sorry for better words yeah yeah so um in this particular example it no longer goes to the detail view of that park so i didn't necessarily make the button go away but i changed what was triggering the action so we have our action main menu or go to menu view sorry and uh its appearance right now is displayed prominently that makes it show up as a button i can make it do not display and the button would go away but i still wouldn't get the navigation behavior that i wanted so what i did is i went to the ux menu uh earlier in the slides we said that every deep link action has to be triggered by an event so that button press is an event but it's not the only event in the ux menu in a view you have the behavior section down here which is uh exposes an event called row selected gotcha so in a row selected do this thing and the thing we want to change it to it's auto by default but we want to change it to go to menu view so that's what triggers that deep link action now gotcha yeah very helpful thank you you're very welcome okay so we have our related data tables here parks has a virtual column which is a list of all related notes so if i came down here to yellowstone you would see down at the bottom related notes and it shows me a list of notes from the notes table that are related back to this particular park okay and part of that default behavior is that app sheet gives us this add button at the bottom of that uh this is called an inline list just as far as definitions are concerned um related notes this inline list of notes at the bottom of it i have view and add if i click view it opens up a full page view of this list of notes and if i click add it opens a form and app sheet's intelligent and it says hey you clicked add on a particular park and this ad is supposed to create a new note well you probably want it related to that particular park which is great that's really impressive um but this little ad thing down here is not intuitive for a user if you want them to create a note you would be expecting them to go down here and see add and know that that's the place they have to go to create one of these things which is kind of a lot i would rather it'd be up at the top so as soon as they come to the view they're prompted to make a note and have a button that indicates hey if i press here it's going to create a note for me so how do we reproduce that cool behavior that this add button did by pre-filling the park okay i'm going to quickly create a new action this action is given to me on the parks table i'm going to call it create note i'm going to set it to go to another view within this app it asks me for a link target i know i need to go to some view so i'm going to go to my ux menu and look down the list of views i want to open something in the notes table it has to be a form view well app sheet has this default view called notes underscore form if you're not seeing that if you scroll down to the very bottom it should show like a button here that says show system views you can click that and you'll see these uh lighter ux controllers so notes form is the name of the thing i want to navigate to so if i used the expression from our previous example link to view and i want to go directly to the notes form uh let's give it a nice icon uh text text bubble i like it we're gonna make that show up as a prominent button i'm gonna save it i i guess it's saved i don't know my screen's getting weird okay coming back now okay national parks parks yellowstone hey we have our button if i click it it opens a new view and it's a notes form but the problem is it's not relating back to the park i came from so i have to like click through this massive list of parks to find yellowstone and fill it out not optimal right we want better for our users so i'm going to use a different action type to initiate and uh initiate this view transition and pre-fill some values does anybody remember the name of that action or the name of that uh deep link expression link to form you got it jared link to form so down to my deep link options i'm going to go look at link to form and it has quite a mouthful for its pattern here so let's uh talk through all of the parameters inside of this expression the first one is the form view name okay so it's not just a view name like link to view it has to be a form view name which we already have we have notes form great there's a comma and then the next thing is in square brackets so we know it's optional and then it ends up having an ellipses in here as well that means you can repeat this pattern indefinitely and it is column name one comma column value one comma column name two comma column value two that means what's the name of the column in the in the view we're going to or form we're going to and then what are you going to fill that value with do you want to specify another column that you want to pre-fill okay what value there and then another optional parameter is an app id meaning you can actually navigate to a form in another app and pre-fill it with data from the app you just came from which is kind of cool we're not going to do that in this one but we will build out this link to form expression so i'm going to insert this and app sheet gives me some random column names and value names i'm not going to use those let's set the form view notes underscore form and the columns i want to pre-fill if i go look at my list of columns in the notes table the note id is filled automatically there's an initial value expression on that that generates this unique id i have to put some park id in column b in the part column to relate it back so that's step one and then again i want to pre-fill note with something else just a random message to indicate that the user should fill it out now a little side note here the name of the column has to be the way it's named in the destination form so we initiate this action in the parks table but it's going to another form view that is of the notes table so any column pre-filling that i'm going to do i have to name them according to what they're named in the destination table so i'm going to name this parks but when i do a column reference because i want to fill this with the park id i have to treat it relative to the table i'm initiating the action from so this one's called park id here so that's the value i want to pre-fill into the part column in the notes table it's a dynamic value from a column of this row so that's why i put the square brackets around it i don't put square brackets around parks because i'm not i don't want that to be dynamic i want it to be static i want it to be the column named parks but the value that goes in it i want to be dynamically chosen i want it to be whatever the park id is for this rose park and then let's just not worry about this second one for now i'm going to save it okay so we click create note oh something's happening here can anybody tell me why this isn't pre-filling we made a link to form we put all the stuff in there codepox should be co-park excellent catch if we look here the column specification is parks but the column here is park darin you got that in the chat too i see you you're sharp okay you guys have eagle eyes i miss stuff like this all the time and then i start pulling my hair out because i'm like why isn't this working surely app sheets broken this is a bug and i start writing the bug to support appsheet.com and then i go to like test it one more time and i'm like oh i spelled it wrong so embarrassing usually i actually like send this bug report first and then i test it again and find out that i spelled it wrong embarrassing okay let's change that and see if it works i want to start over from the beginning here yellowstone create note hey we are pre-filling it let's fill that out and save it i'm going to push the sync through and for those new to app sheet and new to relational database tables in the data table it stores the id but because that column is a ref column in app sheet it doesn't show that id to the user anymore it shows the labels which can be in one image and one text so that's why we see the image of yellowstone and the text yellowstone for all these options instead of their ids even though what we save in the sheet is the id so very important tidbit there for relational database stuff that can be really confusing we cover a lot of that in our app sheet proficiency boot camp uh how to normalize how to how to structure your data to be related to each other instead of being one big giant table or repeating data unnecessarily we take we teach you how to break it apart and use stable keys or ids and the difference between keys and labels how to build the ref columns associate them to the right tables and get this awesome related data effect in your apps okay so somebody help me out here i want to pre-fill the notes column with the text this is the best note ever actually tell you what i think it'd be more fun if we fill it with the park id again so somebody help me out here what's next i want to pre-fill the notes column could you just put the column in again after a comma yep let's uh let's try it this way chat me what the expression should look like so write it yourself and chat it to me and we'll try a few of them out and see see if one of them works it's one thing saying it's a whole nother thing writing it and then you have to worry about oh is there a space there comma no comma it can be tricky and again the goal here is i like what i have for this part but i also want to fill out the note column and i want to fill it with uh for fun i want to fill it again with the park id but i wanted to actually show the id value all right they are starting to flow in these are looking good very nice okay so i'm going to take a couple of these and just use them as examples just to kind of show how small changes uh affect the behavior so oops that was the wrong deal i want to copy this copy paste okay so this is one of them we added a comma we added another name of a column and another value of a column what this is going to do is when i press the create note button it's going to pre-fill the note column with the exact text park which is kind of how i i did it in the uh initial demo and the completed app so that's a great example of how to fill it with what i call static text as in it's not data driven uh or dynamic and then we have uh other examples where we have the park id in square brackets and let's see what the behavior does here discard this one come back in we'll look at zion now create a note one two one one six eight eight c very cool let's look at a different park yosemite so now it fills it with yosemite's id so it's different between each part i click on so again square brackets make it dynamic and different for every row in quotes makes it static and the same for every row we apply it to so great love what i'm seeing you guys are grabbing hold of this so that is uh all of the interactive examples we're going through today the app has a bonus link to uh expression and it is this one in parts by state where we filter a view while we navigate to it so i don't have a slice which is normally how one would filter data you can make slices of whole tables i have two slices parks not visited and parks visited where the condition is the visited column doesn't equal to do or the visited column equals to do i want to filter i mean if i wanted to do it that way i would have to make a new slice for every state park which would end me up with like 70 slices in my app and that would be not efficient so an easier way to do that is to use a link to filtered view expression so in the state in the behavior menu in the actions tab there is an action called see parks in this state and it is a deep link expression or deep link action and i use link to filtered view which takes me to any view now this view has to be a collection view or a a group for you so a table a deck a gallery a map or a card view anything that shows or maybe maybe a calendar view that shows multiple records at one time so forums and detail views don't show more than one record at a time so this is irrelevant to those and then the second parameter is a filter condition so this is like the condition and a slice basically show me all the parts and then run this expression on every park in that list or so show me the all parts table excuse me allpark's view which is connected to the parks table run this expression on every row in the parks table and each one that passes this expression where this results to true include that in the view otherwise exclude it from this view so where the state column is equal to the state column from the row we just clicked on and why we have to use this row we explain more in our expression mastery bootcamp and we talk about context about where data is relative to when you put square brackets around it so how does it know what table and what row i'm referring to when i put square brackets around something so that's a little bonus for you guys if that's kind of blowing your mind or something you want to learn more about the expression mastery boot camp would be helpful for you there um guys i want to thank everyone for attending again we'd love to see you check out some of our on-demand boot camps our on-demand videos join a live boot camp or uh engage with us for consulting we want to come behind you and help you unlock all the power of appsheet thanks guys [Music]
Info
Channel: AppSheet Training
Views: 2,412
Rating: undefined out of 5
Keywords: AppSheet, Database, App Development, Google Sheets, Excel, SQL, Smartsheets, No Code, Google Forms, Graphs, Report, Mobile App
Id: 0c2W1yA9_TU
Channel Id: undefined
Length: 69min 1sec (4141 seconds)
Published: Fri Sep 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.