Hi,
I'm creating a sequence variable from a ShowColumns / Filter search on a SP list (this is run when a button is pressed, which also navigates a new screen).
Set(
TOSeqNext,
ShowColumns(Filter(
'Risk - SPOC',
Register = "TO"), "Sequence")
)
I want to use this in a Patch, but it keeps given an error that it is a table and not text, number, boolean....how do stop it being a table record but a text string?
Patch('SO&A - Risk Register', Defaults('SO&A - Risk Register'),
{
Title: "TO " & TOSeqNext.Sequence,
'Risk Title': DataCardValue37.Text,
'Risk Description':DataCardValue38.Text
}
)
Solved! Go to Solution.
Yes, your variable is set to a table!
Not exactly sure what it is that you are trying to get to, but you need a value, not a table.
If you are trying to get the last sequence number in your variable, then you need to lookup the value.
Example:
Set(TOSeqNext,
LookUp('Risk - SPOC', Register = "TO", Sequence)
)
If you have some order to this, then include that as part of your lookup.
Example:
Set(TOSeqNext,
LookUp(Sort('Risk - SPOC', Sequence, Descending), Register = "TO", Sequence)
)
I hope this is helpful for you.
Try another period on the Sequence to see if it suggests .Value
Title: "TO " & TOSeqNext.Sequence.Value,
Edit: i think you can omit the showcolumns, including the sequence column in your filter should return only that columns value.
Filter(
'Risk - SPOC',
Register = "TO", Sequence)
Yes, your variable is set to a table!
Not exactly sure what it is that you are trying to get to, but you need a value, not a table.
If you are trying to get the last sequence number in your variable, then you need to lookup the value.
Example:
Set(TOSeqNext,
LookUp('Risk - SPOC', Register = "TO", Sequence)
)
If you have some order to this, then include that as part of your lookup.
Example:
Set(TOSeqNext,
LookUp(Sort('Risk - SPOC', Sequence, Descending), Register = "TO", Sequence)
)
I hope this is helpful for you.
It gives no more suggestions and adding .Value returns another error (Name is invalid)
I couldn't see the route to the value, which is my sequence number. This has worked.
Thanks for taking time to look and answer.
User | Count |
---|---|
254 | |
107 | |
92 | |
47 | |
37 |