User Profile
Acorn999
Brass Contributor
Joined Nov 14, 2022
User Widgets
Recent Discussions
Re: Incompatible types for comparison. These types can't be compared: Table, Number.
Resolved my issue by removing these brackets from Fill property DataCardValue [], It seems these brackets around a DataCardValue will set the value as a table. This caused the issue for If(Not(IsBlank to always return true. Issue: [DataCardValue14.Text] Issue resolved DataCardValue14.Text Before fix: If(varTabSelected = ThisItem.ID, RGBA(0, 120, 212, 1),If(Not(IsBlank([DataCardValue14.Text]))&&ThisItem.ID = 2, Color.Green, Color.Gray)) After Fix: If(varTabSelected = ThisItem.ID, RGBA(0, 120, 212, 1),If(Not(IsBlank(DataCardValue14.Text))&&ThisItem.ID = 2, Color.Green, Color.Gray))Incompatible types for comparison. These types can't be compared: Table, Number.
My app uses a gallery of buttons to act as tabs and create a tabbed form. See screenshot. Each field in the form Visible property is set to either true so it shows on all tabs or set to varTabSelected=X so it shows only on a specific tab, where X is the ID of the button. The back end of the app is a SharePoint list. The field is a Single Line of Text. In PA, the field name is DataCardValue14. The intention is to fill the gallery as green if the field has a value and grey if the field does not have a value. I set the Visible property to true so the field always shows and visible property is not a contributing cause in this issue. No matter what, this code for the Gallery Fill property returns true, even if the field is blank / null: If(Not(IsBlank([DataCardValue14]), Color.Green, Color.Gray) If I set the value to 5, or the default to 5, and then set Gallery Fill property to: If([DataCardValue14] = 5, Color.Green, Color.Gray) PA shows ""Incompatible types for comparison. These types can't be compared: Table, Number." PA does not see DataCardValue14 as a text or number. Instead, it sees DataCardValue14 as a table. If I try to cast the DataCardValue14 as Text: If(Not(IsBlank(Text([DataCardValue14]))), Color.Green, Color.Gray) PA shows "Expect Text or Number. We expected a text or a number in this point of the formula." Why does PA think this value is a table and what can be done so the formula properly evaluates to true or false?SolvedRe: If(Not(IsBlank([DataCardValue]) is always returning true in cases where it should not
I have made an additional discovery on this issue but not yet identified a resolution: If the Visible Property is set to true so the field always shows and the Gallery Fill property is set so that the field having a value is the only condition: If(Not(IsBlank([DataCardValue14.Text])), Color.Green, Color.Gray) the issue persists. I tried setting the default value to 5, and then setting the Gallery Fill property to this: If([DataCardValue14] = 5, Color.Green, Color.Gray) This did not work but it did provide information about the issue: Power Apps shows "Incompatible types for comparison. These types can't be compared: Table, Number." So assuming 5 is the number, it looks like PowerApps sees DataCardValue14 is a table. In the backend SharePoint, DataCardValue14 is a Single Line of Text field with no validations and it is not required. I do not know why PowerApps sees this field as a table. I have not found anything useful so far Googling the issue.Re: If(Not(IsBlank([DataCardValue]) is always returning true in cases where it should not
H2O Very Appreciated for your help. Both of your solutions were not successful. 1. HasValue() is not a known function in MS PowerApps. It looks like it is related to checking whether a Media data type field in a record has been initialized with a media object and that the object exists - for Dynamics NAV. 2. Whether the field is visible or not: What causes certain fields to only show when a given tab is selected is the Visible property. This is what makes the tabbed form work as a tabbed form. Normally I set the Visible Property to: varTabSelected=2 So that it only shows when tab 2 is selected. In response to your suggestion, I can't set the Visible Property to false if the field is blank because I have no working function to know of the field is blank - that's my issue, ,Not(isBlank is always returning true, and I need the Visible Property to show the field only if the associated tab is selected, whether or not the field is blank. However, to test if the visible property is having an effect or causing this issue, I set the Visible property to true so the field always shows regardless of which tab is selected. In this scenario, the issue persists.If(Not(IsBlank([DataCardValue]) is always returning true in cases where it should not
I have a Power Apps Canvas app with a tab-like experience developed. The tabs are created from a gallery of buttons. There are fields on each tab. If a tab is selected, the tab fill should be blue. Else if the tab is not selected and a specific field on tab 2 (DataCardValue14) has a value, the tab fill should be green to show the field has a value. Else if the tab is not selected and the specific field (DataCardValue14) does NOT have a value, the tab fill should be grey. The idea is to provide an easy way for users to know if a given tab has an entry for the field or not by seeing the tab color is green, without having to go check it on each tab. Once this works I will add additional fields so the user will know by color if the tab has all the fields entered or not. But for now I am focused on the color fill for one field. See the screenshot. The issue: The code I have written below will: 1] Successfully set the tab fill to blue if the tab is selected 2] Issue here: If the tab is not selected, PA sets the fill to green whether or not the DataCardValue14 field has a value. PA always responds as if this field has a value, even if it does not value. The result is the tab fill is always green even in cases where it should be grey (field is blank). These have all been tried independently in the Gallery Fill property and all show the same issue. RGBA(0, 120, 212, 1) is the blue color for a selected tab. I have excluded the code that sets the color on a specific tab for clarity. At this point I just need the code below to accurately see if the DatacardValue is blank or not. I have tried this with other fields, the same issue replicates on any field. The backend is a SharePoint List. DataCardValue14 refers to a single line of text field, and entry is not required. If(varTabSelected = ThisItem.ID, RGBA(0, 120, 212, 1),If(Not(IsBlank([DataCardValue14])), Color.Green, Color.Gray)) If(varTabSelected = ThisItem.ID, RGBA(0, 120, 212, 1),If(Not(IsBlank([DataCardValue14.Text])), Color.Green, Color.Gray)) If(varTabSelected = ThisItem.ID, RGBA(0, 120, 212, 1),If(Not(IsEmpty([DataCardValue14])), Color.Green, Color.Gray)) If(varTabSelected = ThisItem.ID, RGBA(0, 120, 212, 1),If(Not(IsEmpty([DataCardValue14.Text])), Color.Green, Color.Gray))SolvedRe: Unable to filter for multiple values in column
There may be a better solution but this one works for me: Create a new table to serve as a Cross Reference with Right-click 'Reference' in Data view. In that table, remove all columns except the ones one with multiple values and the ID column. Split each column that has multiple values by delimiter [ comma ] into rows. Create a new table for each column that has multiple values with Right-click 'Reference'. This creates the values for the slicer for a given column. In the slicer values table, right-click and remove duplicates. At this point there should be three tables: 1] the original source data table 2] the cross reference table that has the multiple values split into rows and has an ID column 3] the slicer table that has only the unique values from any one column that had multiple values, no other columns. In Relationships, 1] Connect slicer table to cross reference table, many to one, one way, on the column name (that had multiple values). 2] Connect cross reference to source table, many to one, two way, on ID. For the visualization, The slicer gets its values / choices from the slicer table. The graphs to show the actual data gets its values from the source table. End result is the slicer shows unique values but selection of one or more values returns all matching hits in the source table as it should. I also changed source data to be a SharePoint list instead of Excel, however, the solution should work with an Excel data source the same way.3.3KViews1like0CommentsUnable to filter for multiple values in column
I am working in Power BI. I have Premium Capacity. Source Data is Excel. The source column has multiple values separated by semicolon. This shows my scenario from left to right: I am not able to return accurate results from the slicer if mulitple values are selected because the filter context only looks for a single value. I have tried: 1] Create a separate table for the slicer default values, create relationship to source data table with both one to one and many to one cardinality > the issue is the graphs from Population only show data where the column has a single value. It won't show the data where the column had multiple values or shows them all combined in their own bar. 2] create separate columns for Population so each value has its own column > the issue is the filter only looks at the first column. It can caused missed data if the value was in columns 2,3,4,5 There should be a way to deal with columns that have multiple values separated by semicolon, show only unique values in the slicer, but filter context needs to pass and return rows where any one or more slicer filter values is found in the one column in any order.Solved3.5KViews0likes1CommentSharePoint List Validation works differently based on user
My organization uses a SharePoint List to enter, edit and store certain data. There are two users of this list for this issue. Both users are Site Owners. User 1 User 2 One column in the list for Member MBI Data has the below validation. This is a single line of text field that allows numbers and letters. =OR(ISBLANK(MEMBERMBI),LEN(MEMBERMBI)=11) Error message: 'Member MBI must be 11 characters.' This validation forces the field to have either 11 characters OR be NULL. A NULL value is allowed. This validation is set in Column Settings > Column Validation. It also shows the same code in List Settings > Edit Column > Column Validation. The issue: User 1 can Create or Edit and save any List item with a NULL MBI and save, OR can even remove the MBI data so the field is NULL and save (This is expected and working properly). However, if user 2 Creates a List Item with a NULL MBI and saves, the save will be disallowed / show the validation and should not. Error message: 'Member MBI must be 11 characters.' OR If user 2 Edits a List Item and removes the MBI Data so the field is NULL and saves, the save will be disallowed. Error message changes to this: 'Error: The server was unable to save the form at this time. Please try again.' I tried removing user 2 completely from the SharePoint List and adding back both as owner and separately, as member. The issue replicates in both cases. It seems like a permissions issue for user 2 but both users are set as Site owners. Any idea what would cause a List Validation to force NULL on one or more user accounts but not others accounts even while the validation is coded to allow NULL?Solved970Views0likes1CommentPower Automate Trigger when SharePoint item created/modified endless loop
I have a SharePoint List and a Power Automate flow which is triggered when an item is added or modified in the SharePoint list. The power Automate flow modifies one of the values in the list item. Because the Power Automate flow modifies an item in the list, this causes the flow to re-trigger because the item was modified. This causes an endless loop where the flow runs, modifies item, flow runs, modifies item, endlessly. The flow owner is a Service Account, not an account which belongs to an actual user at my organization. We can refer to this account as 'serviceaccountusername'. This means if the flow Trigger Conditions expression could cause flow NOT to run when ['Modified By] is 'serviceaccountusername', it would solve my issue. To summarize what I need: If the 'Modified By' value is 'serviceaccountusername', do NOT run the flow. ELSE the 'Modified By value is NOT 'serviceaccountusername' RUN the flow. What this accomplishes: If the flow / 'serviceaccountusername' modified the item, don't trigger the flow. If a real user modified the item, trigger the flow. Nothing I have tried accomplishes this: (equals(triggerBody()?['Modified By'],'serviceaccountusername')) flow runs but does not stop endless loop @not(equals(triggerBody()?['Modified By'],['serviceaccountusername])) Invalid expression, flow does not save @equals(triggerBody()?['Modified By'],'serviceaccountusername',false) causes flow not to run for ANY user @not(equals(triggerBody()?['Modified By'],'serviceaccountusername',true)) flow runs but does not stop endless loop @not(equals(triggerBody()?['Modified By'],'serviceaccountusername',false)) flow runs but does not stop endless loop @not(equals(triggerBody()?['Modified By'],['Value'],'serviceaccountusername')) Invalid expression, flow does not save @not(equals(triggerBody()?['Modified By']?['Value'],'serviceaccountusername')) flow runs but does not stop the endless loopSolvedRe: Validate Column is either NULL or has 11 characters
This resolved the issue. Very appreciated. Also the formula is entered in "column validation" and it works there. If I now go to "list validation" the same formula shows there. Next time for any issue, I will try entering the formula in both places and also try replace comma with semicolon.3.7KViews1like0CommentsValidate Column is either NULL or has 11 characters
The SharePoint List has a Single Line of Text Column. In this column any combination of letters and numbers can be entered. I need these two validations to run: 1] The field can be NULL / BLANK / Can be left blank OR 2] IF the field has a data entry, it must be 11 characters. Not less than 11, not more than 11. Require that this column contains information is not checked in all cases. Another way to summarize: Allow either zero characters or 11 characters, else show the validation. nothing I have tried works. =LEN([MEMBERMBI])=11 Even if the field is not set to require entry, with this validation, the field requires entry. Cannot be NULL. =IF(OR(LEN(MEMBERMBI)=0),(LEN(MEMBERMBI)=11)) With this validation, the field requires entry. Cannot be NULL. =IF(NOT(ISBLANK(MEMBERMBI))),AND(LEN(MEMBERMBI)=11) SharePoint removes the code on Save, does not like this code. Is there a way to allow either a NULL entry OR if there is an entry, validate on LEN=11?Solved4KViews0likes3Comments
Recent Blog Articles
No content to show