This website uses Cookies. Click Accept to agree to our website's cookie use as described in our Privacy Policy. Click Preferences to customize your cookie settings.
Lol, fair enough. As a workaround, append the slice/table name to the beginning of the view name followed with an underscore. Then check INDEX(SPLIT(CONTEXT("View"), "_"), 1).
(or some other delimiter if underscores are used in your table/slice names)
@tony This seems to only return the table name… I keep thinking it’ll return the slice or table… but it doesn’t. Any chance CONTEXT(“Slice”) is in the pipeline and could return the slice if there is a slice else table name?
@Grant_Stead, I agree, this would be very useful. I needed it once before and ended up naming my views using the format: {Table/SliceName}_{ViewType} , i.e. ActiveEmployee_Detail.
If you do this consistently with your naming, then you can get the slice name with: INDEX(SPLIT(CONTEXT(View),"_"),1)
@tony, if this does get added, could we please get CONTEXT(ColumnName) or [_THISCOLUMNNAME] too?
I’d like to store Display Names in a table and look them up, so that every column could use the exact same expression for the display name: LOOKUP([_THISCOLUMNNAME],ColumnsTable,ColumnName,DisplayName)
This technique could also be used in just about any column setting if we had a way to reference the name of the current column. The LOOKUP could be used to set values for Initial_Value, Valid_If, etc. and the same formula would work in every field since the column name would be dynamic.
@HSAI Think on a bigger scale. You want a FILTER() expression to work on any view/table basically (from your app pov) but are you sure [LEVEL] is on all of them? Even if this would work it just doesn't make sense
Agree this wasn't the right example to use, filtering would generally be from another table. Nonetheless, using something like CONTEXT(Table) or [_THISTABLE] in a formula that is a dynamic placeholder for the name of the current table would remove the need to re-work formulas when the source table changes in name. Perhaps what I'm actually suggesting here isn't really CONTEXT, it's more so [_THISTABLE] as a placeholder