am trying to build an online inventory to request supplies for the printers. So, am using a form to show the database and i added an if function to filter the items a user can choose based on the printer model chosen.
So when the user, for example, choose HP Laserjet M201 in the printer model, only black toner will show in the item type. So far, all is good. However, another if is set on the default of the datacardvalue of the Product Number that will check both Printer Model and Item Type selected value and will return a text automatically.
If i submit the form, the text value is recorded in the SharePoint list. But, if I try to compare this value to anything or using it in any function, it is always returning blank. For example, if i put a label and put the following in the text: if(datacardvalue.text="83A","Yes","No") it is returning No. It is not able to read the value returned by the IF function.
What should i do? because i need to update the inventory (database) based on this unique value at later stage.
Solved! Go to Solution.
Yes, I just set it to a valid record. In my case I used:
I would first determine if you are missing some blanks that you do not see (trailing blank).
Beyond that, I would always rely on the underlying source in the case of a read only column (looks like that is read only). If it is part of the record, then use the column value of the record instead.
I hope this is helpful for you.
@RandyHayes Whenever i use DataCardValue.Text in any formula, it is always returning a blank value; that's why the If function is not working. For example, i set the default of a text input to datacardvalue.text and it is returning blank while it displays a text inside.
Okay, thanks for clarifying.
So, that should not be the case that you are seeing...let's troubleshoot a little.
First, put a label inside the datacard where DataCardValue18 is and set the Text property to: DataCardValue18.Text See what that shows.
Then put a label outside of the form and set the Text property to be the same as above. What does it show?
Allow me to thank you first for your support,
When i added the label inside the datacard, it works
But, if i add it outside the form, it returns blank.
No problem - happy to help!
So I've heard of this scenario from some in the past couple weeks. It is very unusual and I've never run into it first hand - and I do a lot of reference in and out of forms in many apps.
So, let's see if we can figure out a common problem.
First a couple of general questions:
This is a regular Canvas App - correct?
You have the Form directly on the screen, no container involved - correct?
If you could click on the control in your form datacard and have it expanded in the tree control on the left and then send a screenshot of that, it would be great!
I am seeing something unusual!
In the picture, your datacards are not aligned with each other:
That is not normal. Is that really how it appears in your tree? If so, then something is wrong with that form. Perhaps that is causing the problem?
@RandyHayes ah no, my bad, i took 2 screenshots and combined them because am working now on the laptop screen; a 14 inch one.
Usually, if a label is outside the form, it should work normally when referring to a datacard from the form by only typing datacardvalue.text?
Yes, that is normal. What you are seeing is not normal.
For example, below, the yellow is a label outside of a form and the green is the text input inside the form.
The label is set to, in this case, DataCardValue45.Text
SO...let's try one other troubleshooting step:
1) Put a new TextInput control inside of your datacard and set the Default property to: "Testing"
2) Place a label outside of the form and set its Text property to: thatTextInputAddedName.Text
See if that shows "Testing" in the label.
Your chance to join an engaging competition of Power Platform enthusiasts.
The Super User program for 2022 - Season 2 has kicked off!
Attend in person or online, there are incredible conferences and events happening all throughout the month of September.
In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.