DataTableの一部の値の代入について

いつも参考にさせて頂いております。
Googleスプレッドシートのアクティビティ「繰り返し(スプレッドシートの各行)」
にてチェックの入っている列(処理済み)の処理を除外したいのですが、
条件分岐にて処理済み=falseと入力すると
引数 ‘Condition’: BC32013: Option Strict On が指定されている場合、演算子 ‘=’ に対して Object 型のオペランドを使うことはできません。オブジェクト ID をテストするには、‘Is’ 演算子を使用してください。

と出てきてエラーとなり、
代入を行い変数に格納を行おうとしたところ
引数 ‘Value’: BC30512: Option Strict On では ‘Object’ から ‘Boolean’ への暗黙的な変換は許可されていません。 選択した値がプロパティの型に対応していません。

とエラーが出ました。
Datatable型の値についてはBoolean型への変換は出来ないのでしょうか。

どなたかご教示頂けますと幸いです。

Hey @shunya.watanabe Try this in your condition

Not row.Field(Of Boolean)("processed")

Cheers

thanks full
what means “not row”?

row is the item name fromthe For each loop means get the value from the DataRow in the processed column and Not is the logical NOT operator it flips True → False, and False → True.

Cheers

I don’t want to swap false and true.

I want to store it as a boolean variable.

Like you have to store the processed column value of to a variable of boolean type.
For this use Assign activity and use this
isProcessed = Boolean.TryParse(row("processed")?.ToString, isProcessed)

isProcessed is of type Boolean

Cheers

Hello @shunya.watanabe

Use the expression Convert.ToBoolean(row("Processed")) = False in the condition instead of Processed = False

Or Please share error screenshot

Regards,
Rajesh rane

Resolved error
thank you so much

@shunya.watanabe

Most Welcome

Regards,
Rajesh Rane

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.