Hi All,
How to convert a Text type to record type in the below formula?
My data source is SharePoint.
Data Source List Name is: New Data Request_2
"IDTitle" is a column in SharePoint with 'Choice' Data type i.e., I am trying to give "IDTitle" column in dropdown in edit form.
Trying to Concatenate 'ID' and 'Title' column and store that in "IDTitle" column.
UpdateIf('New Data Request_2', ID=Form1.LastSubmit.ID, {IDTitle: Text(Form1.LastSubmit.ID) & "-" Form1.LastSubmit.Title})
Error which i am getting - Incompatible type, The 'IDTitle' column in the data source you are updating expects a 'Record' type and you are using a 'Text' type.
Please let me know how to change this formula as Record Type.
Thanks in Advance
Prakash
Solved! Go to Solution.
@Anonymous
You mention that your column is a Choice column. I would assume you are allowing write-in values to that column, otherwise assigning random values will not work properly.
If so, then your Formula should be the following:
UpdateIf('New Data Request_2',
ID=Form1.LastSubmit.ID,
{
IDTitle: {Value:Text(Form1.LastSubmit.ID) & "-" Form1.LastSubmit.Title}
}
)
I hope this is helpful for you.
@Anonymous
Record is made like this
Text:
"Some Text"
Record:
{SomeInnerColumnOrKey: "SomeStringValue"}
Record with two columns and values (there can be more than two, here is an example of two columns and values though):
{SomeInnerColumnOrKey: "SomeStringValue", SomeInnerColumnOrKey2: "SomeStringValue2"}
Depending on your case, "SomeStringValue" would not be valid if the schema is expecting another type of Value there.
For your case, it is related to it being a Choice field. Make sure to pass into it a Record inline instead of Text. So something like IDTitle: { SomeKey: "SomeValue"} instead of just "SomeValue"
We'll leave it up to you for now to figure out the correct SomeKey and "SomeValue" for your specific scenario.
Check if above helps @Anonymous
Hi @poweractivate ,
Thanks for the explanation. I was able to understand your explanation but unable to execute it. I tried but not sure with my code and ending up with errors.
Some sample code will be helpful or altering my above code will be helpful since i am new to power apps.
Thanks in Advance
Prakash
@Anonymous
You mention that your column is a Choice column. I would assume you are allowing write-in values to that column, otherwise assigning random values will not work properly.
If so, then your Formula should be the following:
UpdateIf('New Data Request_2',
ID=Form1.LastSubmit.ID,
{
IDTitle: {Value:Text(Form1.LastSubmit.ID) & "-" Form1.LastSubmit.Title}
}
)
I hope this is helpful for you.
User | Count |
---|---|
258 | |
111 | |
95 | |
48 | |
41 |