Hi,
Good Day...
I have created a canvas app which is connected with excel source in onedrive. First, the app allows user to see the record and enter their number in Input text box, so, the RAG (Red, Amber, Green) button will change its color and text based on user input and it works fine. Also, the RAG text should be captured in RAG column in excel. So I have used the Patch function Onsuccess of Editform to achieve this, unfortunately it is taking stale data sometimes, not updating anything sometimes and also not working as expected.
Secondly, the update function is not updating a value in all the records if any blank in between the records in a column.
Patch Function Formula used in my app:
I used this formula in OnSuccess of Editform and tried with OnSelect of Save button as well still it is not working properly.
Patch( Table, Editform.LastSubmit,
{ RAG_status: If(
Value(Greenvalue.Text) < Value(Redvalue.Text),
with(
{input: Value(Input.Text)},
If(
input >= Value(Redvalue.Text),"Red",
input <=Value(Greenvalue.Text),"Green",
input <Value(Redvalue.Text),"Amber"
)
),
with(
{input: Value(Input.Text)},
If(
input >= Value(Greenvalue.Text),"Green",
input <=Value(Redvalue.Text),"Red",
input >Value(Redvalue.Text),"Amber"
)
)
)
})
Update Function:
This one I am using OnSelect of a Clear button to clear all the records of the specific columns.
UpdateIf( Table, true, {Input:"", RAG_Status:""})
Please help me fix this issue.
Thanks in advance.