Dynamic Layouts in Filemaker - layout

First off I am new to FM but I have a good handle on the basics. What I need to do is this - in a contact information type layout I want to be able to alter the layout based on a specific field. Ex. When the record is brought up, the background of the layout will change colors for a client, another for vendor, etc.
I tried to change a label based on a field, with no success. My guess is that the layout is static and only the data fields change.
We use FM Pro.
Thanks,
Mark

FileMaker layouts are static, but there are still some things you can do to alter the layout based on the values of fields:
Calculation Fields
If you want the data shown in an area to change, you can use a Calculation field. A typical example of this would be a status field. To do this you would add a new field to your table and use enter a calculation on that field like:
Case (
IsEmpty(myTable::myField) ; "Please enter a value for myField." ;
myTable::myField = "wrong value" ; "Please enter a correct value for myField." ;
"Everything seems okay."
)
Conditional Formatting
To make things like background color change you can use a conditionally formatted field. I will typically add an empty numeric field (for this example we'll call it emptyField) and set it so that it can't be edited during modification.
If you place emptyField on your layout, below all the other fields and disallow the user to enter the field in either Browse or Find mode, you can then use conditional formatting to change the field's color.
Portal Hiding
You can use this technique when you want some elements of your UI to disappear when they aren't needed. For example, if you want a "submit" button to appear only when all of the records on a field are filled out.
To use this technique I will usually create a Calculated number field, called ReadyForSubmit, on the original table and give it a logical calculation like:
not IsEmpty(field1) and ... and not IsEmpty(fieldN)
(Note that the value of the above function would be 1 or 0)
I will then create a new Support table in my database and add to it a field One with a calculated value set to 1.
I will then make a relationship between myTable::readyForSubmit and Support::One.
On the layout, create a portal with one row. Put your Submit button in that layout. Now, when readyForSubmit calculates to 1 the button will appear. When it calculates to 0 the button will be hidden.
Hidden Tab Browser
Finally, you can use a tab browser where you set the title font size to 1 point, hide the border, and control the browser programmatically. You can use this for having different field arrangements for different types of records. To do this you would first give an Object name to each tab of the tab browser, say Tab1, Tab2, Tab3.
Then you would add a script, goToTab, with the logic for when you want to go to each tab. Say:
If (myTable::myField = "corn")
Go to Object (Tab1)
Else If (myTable::myField = "squash")
Go To Object (Tab2)
End If
You would then use Script Triggers to run goToTab when On Record Load.

With the release of filemaker 13 there may be another way to do this. You could use a slide control, name the panels in the control, and conditionally switch to the correct panel based on the record type.
you would drop the appropriate fields for the record type in each panel.
http://help.filemaker.com/app/answers/detail/a_id/12012/~/using-slide-controls-and-slide-panels-in-filemaker-pro

Related

When my toggle is selected as yes I want a default value to be inputted into my dropdown box below, how do I do that?

Here is an image of it. I want the default value to be Open when the toggle is selected as yes.
Change the Default setting for the dropdown control to a formula along these lines:
If(MyToggle.Value=true,"Three","One")
If the control is a Combobox, which is what's used for a SharePoint Choice column, then the items are records, not just a list of text. For a combo box you need to change the property for "DefaultSelectedItems" and set it to something like this:
If(MyToggle.Value,{Value:"Three"},Parent.Default)
Make sure that the value you are using is a valid one according to the SharePoint choice column definition.

Force user to select only one value from filter spotfire

Is it possible to force the user to select only one value from a filter ?
For a radio button filter as below, is it possible to remove the buttons all & none and make sure that only one Choice is selected ?
you cannot change the existing filter features or functionality without developing a custom extension for a new filter control.
that said, you can certainly emulate a filter using what's called a Property Control and a Data Limiting Expression. for single selection, you're stuck with either a Dropdown control or a Listbox (single select) control.
you would need to...
create a Text Area Visualization on the page somewhere
insert a Listbox or Dropdown Property Control into the Text Area Visualization
create a Document Property with the same data type as your filter column and associate it to the Property Control. you can set this to Unique Values in Column or write in your own Fixed values.
open the Properties dialog on the visualization you'd like to filter and navigate to the Data page
scroll down to Limit Data Using Expression and use an expression like [MyFilterColumn] = "${MyDocumentProperty}" (quotes are required for string values; if numeric then omit quotes)
Please add this CSS in the HTML page of the spotifre to remove all and none
.ColumnFilter .sf-element-filter-item:last-of-type { display:none; }
.ColumnFilter .sf-element-filter-item:first-of-type { display:none; }
Another way to force the users to select one option is to add a Show/Hide in the visualization like this: Hide if UniqueCount([Field]) is greater than 1

Powerapps: button selection on a previous screen prefill a field in a form

I am attempting to build an app with Microsoft powerapps that will be writing/reading data to/from an excel sheet.
I have created a form in powerapps from a table in the excel sheet. I am curious to know if anyone knows how to fill the data in a field based on a button selection on a previous screen.
As an example let's say the following fields are in the form; Location, Action, Item, Username.
This is what I am imaging and would like to do;
I would like the first two fields to be filled by selecting buttons on a previous screens instead of a drop down menu in the edit form view. the last two field can be filled by inputting text on a thirds screen.
The flow:
Screen1; presents two 4 locations in the form of buttons*doesn't necessarily have to be a button but function like one.
4 locations: NY, LA, AZ, LN
when users selects "NY" button, "NY" is filled/stored in to the "location" field in the form and the screen navigates to the next page where the user will select the actions.
Screen2; presents two 2 actions in the form of button.
2 Actions: remove, add
when users selects "remove" button, "remove" is filled/stored in to the "action" field in the form and the screen navigates to the next page where the user will fill the other two fields in a text field.
Screen3; has two text fields where user can fill in the rest of the information for item and user name. Location and Action should be prefilled at this point. When the user submits the form all data is submitted and a row is created in the excel table with all the information captured.
any information how to make a button selection on a previous screen prefill a field in a form that would be awesome! thank you for reading.
It sounds like you want to use a collection. A collection can be used similar to a global variable and will allow us to access data on a different screen than the one we set it on.
Some useful information can be found here:
https://powerapps.microsoft.com/en-us/tutorials/working-with-variables/#create-a-collection
https://powerapps.microsoft.com/en-us/tutorials/function-clear-collect-clearcollect/
Based off of your flow, let's assume that the screens are named as follows:
Screen1 will be "SpecifyLocation"
Screen2 will be "SpecifyAction"
Screen3 will be "FinalizeInput"
The names are arbitrary, but I think they'll make the following example easier to follow.
On the screen "SpecifyLocation", we're going to create four buttons. They will all be identical, except for the name of the location they reference. For instance, the button referencing "NY" would be as follows:
Text = "New York"
OnSelect = ClearCollect( LocationMetadata, "NY" ); Navigate(SpecifyAction,ScreenTransition.Cover)
Please note that the OnSelect value is two different functions separated by a semicolon. The first function, ClearCollect(), clears all information in a collection and then writes a new entry. In this case, we have a collection named LocationMetadata into which we are writing the value "NY". The second function, Navigate(), changes which screen we are looking at.
On the screen "SpecifyAction", we're going to create two buttons. They will be similar, except for the action they refer to. For instance, the button referencing "Add" would be as follows:
Text = "Add"
OnSelect = ClearCollect( ActionMetadata, "Add" ); Navigate(FinalizeInput,ScreenTransition.Cover)
As was the case before, we've created a button that calls two functions when clicked. They are the same two functions as last time; however, we've changed LocationMetadata to ActionMetadata in our ClearCollect() call, since we want to store a different piece of information. We've also changed our Navigate() call to move us over to the "FinalizeInput" screen.
I'm not entirely sure how you've got your final screen laid out, but in any case, you'll want to access the data we stored in collections previously. This can be done with the function First(), which returns the first element of a collection.
To access our selected location, you can use: First(LocationMetadata).Value
To access our selected action, you can use: First(ActionMetadata).Value
You should be able to supplement whatever extra data is collected from your user on this final screen with the collections we set up.

Gravity forms - merging values

Need some help with Gravity forms. I need to have a field, that is a merge of values ,that user has previously selected.
So, if a user has selected 3 different fields wth values of 1)XYY, 2)YYX,3)YYZ I do not need a sum, just a plain merge, in form of XYY.YYX.YYZ, or anything like that.
Could that be acomplised with some merging tags, or dynamically population?
Thanks
Of course;
You should create two different forms.
Collect data with field1-field2-field3, they can be single line text, number, date or anything. In the advanced tab of field settings, write a parameter name for each one, like field1-field2-field3.
In the second form create a single line text, in the advanced tab of field settings check "dynamically populate field" and write your parameters like field1.field2.field3.
In form1 settings->confirmations->redirect URL line, write your form2 page url where you added form2. Select "Pass field data via query string" and add your parameters like field1={fieldname:1}&field2={fieldname:2}&field3={fieldname:3}
When you submit form1, your form2->single line text field will capture the parameters as you wish.
This is possible with Gravity Forms Populate Anything by...
Add whatever type of field you'd like to use to capture the combined.
Set the Default Value to the merge tags of your 3 fields: #{Field A:1}.#{Field B:2}.#{Field C:3}.
That's it.
Edit: Updated screenshot for Gravity Forms 2.5 and updated merge tags to use the # to make them "live".

Unexpected behaviour in a Lotus Notes programmable table

I'm designing a workflow database in Lotus Notes 6.0.3 (soon upgrading to 8.5), and my OS is Windows XP.
I have recently tried converting a tabbed table into a programmable one. This was so that I could control which tab was displayed to the user when it was opened, so that they were presented with the most appropriate one for that document's progress through the workflow. That part of it works!
One of the tabs features a radio button that controls visibility of the next tab, and a pair of cascading dialogue boxes. One contains the static list "Person":"Team", and the other has a formula based on the first:
view:=#If(PeerReview = "Team"; "GroupNames"; "GroupMembers");
#Unique(#DbColumn(""; ""; view; 1))
The dialogue boxes have the property "Refresh fields on keyword change" selected.
The behaviour that I wasn't expecting is this. If the radio button is set to "Yes" and a value is selected in one of the dialogue boxes, the table opens the next tab. If the radio button is set to "No" and a value is selected in one of the dialogue boxes, the entire table is hidden.
I can duplicate the latter by switching off the "Refresh fields on keyword change" property on the dialogue boxes and instead pressing F9 after selecting a value. I have no idea why the former occurs, though. The table is called "RFCInfo", and I have a field on the form called "$RFCInfo" which is editable, hidden from all users who aren't me and initially set by a Postopen script, which I can post if necessary - it's essentially a Select Case statement that looks at a particular item value and returns the name of the table row relating to that value.
Can anyone offer any pointers?
Hide-when formulas in table cells in Notes R5 and R6 were notorious for breaking in unpredictable ways when you edited the table cells. Even in R7, I think they were still a little bit funky, but by R8 they were finally really solid. You haven't shown the hide-when's but my first guess is that you are simply a victim of the bad behavior.
Please don't shoot the messenger, but the usual way we addressed this sort of problem was to painstakingly re-create the entire table from scratch, and hope we never have to edit it again. I.e., make a copy of the table in a scratch form and clear all the hide-whens -- one by one. Then create a brand new empty table in a second scratch form and get all the cells set up exactly like the original table, including nested tables, merged cells, and other settings -- but skip the hide-whens for now. Then copy each cell's content from the first scratch form to the corresponding cell of the second scratch form. Then, referring to the hide-whens in the original form, re-create each hide-when on the paragraphs in the cells on the second scratch form. Finally, delete the original table from your original form and then copy/paste the table from the second scratch from back into your original form.
Once you have R8.5, move to XPages in Notes, it's almost a no-brainer to implement your tabs. And in return, you get many other interesting issues to solve!

Resources